KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgap > FitnessEvaluator


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 import java.io.*;
13
14 /**
15  * Interface for a fitness evaluator used in a Genotype to determine how to
16  * interpret the fitness value. The fitness value can either be interpreted
17  * straight forward as a fitness indicator (the higher the better). Or it could
18  * be seen as a defect rate (the lower the better).
19  *
20  * @author Klaus Meffert
21  * @since 1.1
22  */

23 public interface FitnessEvaluator
24     extends Serializable {
25   /** String containing the CVS revision. Read out via reflection!*/
26   final static String JavaDoc CVS_REVISION = "$Revision: 1.8 $";
27
28   /**
29    * Compares the first given fitness value with the second and returns true
30    * if the first one is greater than the second one. Otherwise returns false
31    * @param a_fitness_value1 first fitness value
32    * @param a_fitness_value2 second fitness value
33    * @return true: first fitness value greater than second
34    *
35    * @author Klaus Meffert
36    * @since 2.0 (until 1.1: input types int)
37    */

38   boolean isFitter(double a_fitness_value1, double a_fitness_value2);
39
40   boolean isFitter(IChromosome a_chrom1, IChromosome a_chrom2);
41 }
42
Popular Tags