- All Implemented Interfaces:
- FitnessFunction, IndividualFitnessFunction, Serializable
public class MaxOnesFitnessFunction
- extends Object
- implements IndividualFitnessFunction
A FitnessFunction for the "Max Ones" problem. This
FitnessFunction that evaluates an Individual's fitness as the number of 1
genes that it has.
The source code for this class is contained in the file:
- Jan 7, 2007
- Grant Braught, Dickinson College
- See Also:
- Serialized Form
The fitness of an Individual is given by the number of 1 genes that it
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public double evaluate(Individual ind)
- The fitness of an Individual is given by the number of 1 genes that it
- Specified by:
evaluate in interface
ind - the individual to evaluate.
- the number of 1's in the provided individual.