Package org.opt4j.operator.diversity
Class DiversityDoubleAbsolute
- java.lang.Object
-
- org.opt4j.operator.diversity.DiversityDoubleAbsolute
-
- All Implemented Interfaces:
Operator<DoubleGenotype>,Diversity<DoubleGenotype>,DiversityDouble
public class DiversityDoubleAbsolute extends Object implements DiversityDouble
TheDiversityDoubleAbsolutecalculates theDiversityas the mean absolute difference of each entry in the double vector.
-
-
Constructor Summary
Constructors Constructor Description DiversityDoubleAbsolute()
-
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
-
-