examples.multiobjective
Class MultiObjectiveFitnessFunction
java.lang.Object
org.jgap.BulkFitnessFunction
examples.multiobjective.MultiObjectiveFitnessFunction
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ICloneable
public class MultiObjectiveFitnessFunction
- extends BulkFitnessFunction
Sample fitness function for the multiobjective problem.
- Since:
- 2.6
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
clone()
Override in your implementation if necessary. |
void |
evaluate(Population a_subject)
Determine the fitness of the given Chromosome instance. |
static double |
formula(int a_index,
double a_x)
|
static java.util.Vector<java.lang.Double> |
getVector(IChromosome a_chrom)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_BOUND
public static final int MAX_BOUND
- See Also:
- Constant Field Values
MIN_X
public static final double MIN_X
- See Also:
- Constant Field Values
MAX_X
public static final double MAX_X
- See Also:
- Constant Field Values
MultiObjectiveFitnessFunction
public MultiObjectiveFitnessFunction()
evaluate
public void evaluate(Population a_subject)
- Determine the fitness of the given Chromosome instance. The higher the
returned value, the fitter the instance. This method should always
return the same fitness value for two equivalent Chromosome instances.
- Specified by:
evaluate
in class BulkFitnessFunction
- Parameters:
a_subject
- the population of chromosomes to evaluate- Since:
- 2.6
getVector
public static java.util.Vector<java.lang.Double> getVector(IChromosome a_chrom)
- Parameters:
a_chrom
- the chromosome for which to obtain the result it represents
- Returns:
- vector of data for output
formula
public static double formula(int a_index,
double a_x)
clone
public java.lang.Object clone()
- Description copied from class:
BulkFitnessFunction
- Override in your implementation if necessary.
- Specified by:
clone
in interface ICloneable
- Overrides:
clone
in class BulkFitnessFunction
- Returns:
- deep clone of the current instance
- Since:
- 3.2