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
TheDiversityDoubleAbsolute
calculates theDiversity
as 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 double
diversity(DoubleGenotype a, DoubleGenotype b)
Returns the genetic diversity of twoGenotype
s.
-
-
-
Method Detail
-
diversity
public double diversity(DoubleGenotype a, DoubleGenotype b)
Description copied from interface:Diversity
Returns the genetic diversity of twoGenotype
s.- Specified by:
diversity
in interfaceDiversity<DoubleGenotype>
- Parameters:
a
- the first genotypeb
- the second genotype- Returns:
- the diversity of two genotypes
-
-