org.jgap.impl.job
Class MaxFunction
- java.lang.Object
-
- org.jgap.FitnessFunction
-
- org.jgap.impl.job.MaxFunction
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ICloneable
public class MaxFunction extends FitnessFunction
Fitness function for SimpleJobConsumer.- Since:
- 3.2
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.jgap.FitnessFunction
DELTA, NO_FITNESS_VALUE
-
-
Constructor Summary
Constructors Constructor and Description MaxFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleevaluate(IChromosome a_subject)Determine the fitness of the given Chromosome instance.-
Methods inherited from class org.jgap.FitnessFunction
clone, getFitnessValue, getLastComputedFitnessValue
-
-
-
-
Method Detail
-
evaluate
public double evaluate(IChromosome a_subject)
Description copied from class:FitnessFunctionDetermine the fitness of the given Chromosome instance. The higher the return value, the more fit the instance. This method should always return the same fitness value for two equivalent Chromosome instances.- Parameters:
a_subject- the Chromosome instance to evaluate- Returns:
- positive double reflecting the fitness rating of the given Chromosome. Note that if a non-positive double is returned, a RuntimeException should be generated
-
-
DMelt 3.0 © DataMelt by jWork.ORG