Package org.opt4j.operators.diversity
Interface Diversity<G extends org.opt4j.core.Genotype>
-
- Type Parameters:
G
- the type of genotype
- All Superinterfaces:
org.opt4j.core.optimizer.Operator<G>
- All Known Subinterfaces:
DiversityBoolean
,DiversityDouble
,DiversityInteger
- All Known Implementing Classes:
DiversityBooleanFraction
,DiversityDoubleAbsolute
,DiversityDoubleEuclidean
,DiversityGenericImplementation
,DiversityIntegerEuclidean
,DiversityPermutation
public interface Diversity<G extends org.opt4j.core.Genotype> extends org.opt4j.core.optimizer.Operator<G>
TheDiversity
determines the genetic diversity of twoIndividual
s. The genetic diversity is 0 if bothGenotype
s are equal and 1 of they are of maximum diversity.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description double
diversity(G a, G b)
Returns the genetic diversity of twoGenotype
s.default java.lang.Class<? extends org.opt4j.core.optimizer.Operator<?>>
getOperatorType()
-
-
-
Method Detail
-
diversity
double diversity(G a, G b)
Returns the genetic diversity of twoGenotype
s.- Parameters:
a
- the first genotypeb
- the second genotype- Returns:
- the diversity of two genotypes
-
getOperatorType
default java.lang.Class<? extends org.opt4j.core.optimizer.Operator<?>> getOperatorType()
- Specified by:
getOperatorType
in interfaceorg.opt4j.core.optimizer.Operator<G extends org.opt4j.core.Genotype>
-
-