Package org.biojavax.ga.functions
Interface FitnessFunction
- 
public interface FitnessFunction
Calculates the fitness of anOrganismin aPopulationofOrganisms- Since:
 - 1.5
 - Version:
 - 1.1
 - Author:
 - Mark Schreiber, Susanne Merz, Andreas Dräger
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double[]fitness(Organism org, Population pop, GeneticAlgorithm genAlg)Calculates the fitness oforg. 
 - 
 
- 
- 
Method Detail
- 
fitness
double[] fitness(Organism org, Population pop, GeneticAlgorithm genAlg)
Calculates the fitness oforg. This can be done independently of the Population pop (by ignoring the argument in your implementation) or dependent on the other members of thePopulation pop. Every implementation of this function should assign the fitness value computed in this function to the given organism. This is important so that the organism knows its current fitness. Note that for simple problems this fitness array will contain only one single value. However, to enable multi-objective fitness functions this has to be an array.- Parameters:
 org- TheOrganismto scorepop- ThePopulationto considergenAlg- the parentGeneticAlgorithm- Returns:
 - the fitness score.
 
 
 - 
 
 -