Package geneticalgorithm
Class SpecificationFitness
- java.lang.Object
-
- geneticalgorithm.SpecificationFitness
-
- All Implemented Interfaces:
com.lagodiuk.ga.Fitness<SpecificationChromosome,Double>
public class SpecificationFitness extends Object implements com.lagodiuk.ga.Fitness<SpecificationChromosome,Double>
-
-
Constructor Summary
Constructors Constructor Description SpecificationFitness()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Doublecalculate(SpecificationChromosome chromosome)Assume that chromosome1 is better than chromosome2
fit1 = calculate(chromosome1)
fit2 = calculate(chromosome2)
So the following condition must be true
fit1.compareTo(fit2) <= 0
-
-
-
Method Detail
-
calculate
public Double calculate(SpecificationChromosome chromosome)
Description copied from interface:com.lagodiuk.ga.FitnessAssume that chromosome1 is better than chromosome2
fit1 = calculate(chromosome1)
fit2 = calculate(chromosome2)
So the following condition must be true
fit1.compareTo(fit2) <= 0- Specified by:
calculatein interfacecom.lagodiuk.ga.Fitness<SpecificationChromosome,Double>
-
-