public abstract class FitnessFunction<T extends Chromosome> extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger
Constant
logger |
| Constructor and Description |
|---|
FitnessFunction() |
| Modifier and Type | Method and Description |
|---|---|
T |
getBestStoredIndividual()
If the fitness function as an archive, returns the best individual in the archive.
|
abstract double |
getFitness(T individual)
Calculate and set fitness function #TODO the 'set fitness' part should be
done by some abstract super class of all FitnessFunctions
|
abstract boolean |
isMaximizationFunction()
Do we need to maximize, or minimize this function?
|
static double |
normalize(double value)
Normalize a value using Andrea's normalization function
|
boolean |
updateCoveredGoals()
if the fitness function contains an archive, updates the archive and the fitness values of the population, and returns true.
|
protected void |
updateIndividual(FitnessFunction<?> ff,
T individual,
double fitness)
Make sure that the individual gets to know about its fitness
|
protected void |
updateIndividual(FitnessFunction<?> ff,
T individual,
double fitness,
int toCoverTargets) |
protected void updateIndividual(FitnessFunction<?> ff, T individual, double fitness)
individual - a Chromosome object.fitness - a double.protected void updateIndividual(FitnessFunction<?> ff, T individual, double fitness, int toCoverTargets)
public T getBestStoredIndividual()
public abstract double getFitness(T individual)
individual - a Chromosome object.public static double normalize(double value)
throws IllegalArgumentException
value - a double.IllegalArgumentException - if any.public abstract boolean isMaximizationFunction()
public boolean updateCoveredGoals()
Copyright © 2010–2017 EvoSuite. All rights reserved.