Package org.opt4j.operator.diversity
Class DiversityDoubleEuclidean
- java.lang.Object
-
- org.opt4j.operator.diversity.DiversityDoubleEuclidean
-
- All Implemented Interfaces:
Operator<DoubleGenotype>,Diversity<DoubleGenotype>,DiversityDouble
public class DiversityDoubleEuclidean extends Object implements DiversityDouble
TheDiversityDoubleEuclideancalculates theDiversityby the Euclidean distance between the twoGenotypes.
-
-
Constructor Summary
Constructors Constructor Description DiversityDoubleEuclidean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublediversity(DoubleGenotype a, DoubleGenotype b)Returns the genetic diversity of twoGenotypes.
-
-
-
Method Detail
-
diversity
public double diversity(DoubleGenotype a, DoubleGenotype b)
Description copied from interface:DiversityReturns the genetic diversity of twoGenotypes.- Specified by:
diversityin interfaceDiversity<DoubleGenotype>- Parameters:
a- the first genotypeb- the second genotype- Returns:
- the diversity of two genotypes
-
-