Clover coverage report - JGAP 3.1
Coverage timestamp: Mo Dez 11 2006 21:16:18 CET
file stats: LOC: 42   Methods: 2
NCLOC: 12   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DefaultFitnessEvaluator.java - 100% 100% 100%
coverage
 1    /*
 2    * This file is part of JGAP.
 3    *
 4    * JGAP offers a dual license model containing the LGPL as well as the MPL.
 5    *
 6    * For licencing information please see the file license.txt included with JGAP
 7    * or have a look at the top of class org.jgap.Chromosome which representatively
 8    * includes the JGAP license policy applicable for any file delivered with JGAP.
 9    */
 10    package org.jgap;
 11   
 12    /**
 13    * A default implementation of a fitness evaluator. This implementation is
 14    * straight forward: a higher fitness value is seen as fitter.
 15    *
 16    * @author Klaus Meffert
 17    * @since 1.1
 18    */
 19    public class DefaultFitnessEvaluator
 20    implements FitnessEvaluator {
 21    /** String containing the CVS revision. Read out via reflection!*/
 22    private final static String CVS_REVISION = "$Revision: 1.10 $";
 23   
 24    /**
 25    * Compares the first given fitness value with the second and returns true
 26    * if the first one is greater than the second one. Otherwise returns false
 27    * @param a_fitness_value1 first fitness value
 28    * @param a_fitness_value2 second fitness value
 29    * @return true: first fitness value greater than second
 30    *
 31    * @author Klaus Meffert
 32    * @since 2.0 (until 1.1: input types int)
 33    */
 34  36153 public boolean isFitter(final double a_fitness_value1,
 35    final double a_fitness_value2) {
 36  36153 return a_fitness_value1 > a_fitness_value2;
 37    }
 38   
 39  28929 public boolean isFitter(IChromosome a_chrom1, IChromosome a_chrom2) {
 40  28929 return isFitter(a_chrom1.getFitnessValue(), a_chrom2.getFitnessValue());
 41    }
 42    }