G
- the type of genotypepublic interface Diversity<G extends org.opt4j.core.Genotype>
extends org.opt4j.core.optimizer.Operator<G>
Diversity
determines the genetic diversity of two
Individual
s. The genetic diversity is 0 if both Genotype
s are
equal and 1 of they are of maximum diversity.Modifier and Type | Method and Description |
---|---|
double |
diversity(G a,
G b)
Returns the genetic diversity of two
Genotype s. |
default java.lang.Class<? extends org.opt4j.core.optimizer.Operator<?>> |
getOperatorType() |
double diversity(G a, G b)
Genotype
s.a
- the first genotypeb
- the second genotypedefault java.lang.Class<? extends org.opt4j.core.optimizer.Operator<?>> getOperatorType()
getOperatorType
in interface org.opt4j.core.optimizer.Operator<G extends org.opt4j.core.Genotype>