org.jgap.gp
Class GPFitnessFunction
- java.lang.Object
-
- org.jgap.gp.GPFitnessFunction
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- FormulaFitnessFunction, SymbolicRegression.FormulaFitnessFunction
public abstract class GPFitnessFunction extends java.lang.Object implements java.io.SerializableFitness function for GP-Programs.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static doubleMAX_FITNESS_VALUEstatic doubleNO_FITNESS_VALUE
-
Constructor Summary
Constructors Constructor and Description GPFitnessFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetFitnessValue(IGPProgram a_program)Retrieves the fitness value of the given GPProgram.doublegetLastComputedFitnessValue()voidGPFitnessFunction()Default constructor.
-
-
-
Field Detail
-
NO_FITNESS_VALUE
public static final double NO_FITNESS_VALUE
- See Also:
- Constant Field Values
-
MAX_FITNESS_VALUE
public static final double MAX_FITNESS_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
GPFitnessFunction
public void GPFitnessFunction()
Default constructor.- Since:
- 3.3.1
-
getFitnessValue
public final double getFitnessValue(IGPProgram a_program)
Retrieves the fitness value of the given GPProgram. The fitness value will be a positive double.- Parameters:
a_program- the GPProgram for which to compute and return the fitness value- Returns:
- the fitness value of the given GPProgram
- Since:
- 3.0
-
getLastComputedFitnessValue
public double getLastComputedFitnessValue()
- Returns:
- the last fitness value computed via method getFitnessValue( Chromosome), or NO_FITNES_VALUE if the former method has not been called yet
- Since:
- 2.4
-
-
DMelt 3.0 © DataMelt by jWork.ORG