Package org.opt4j.operators.diversity
Class DiversityIntegerEuclidean
- java.lang.Object
-
- org.opt4j.operators.diversity.DiversityIntegerEuclidean
-
- All Implemented Interfaces:
org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.IntegerGenotype>
,Diversity<org.opt4j.core.genotype.IntegerGenotype>
,DiversityInteger
public class DiversityIntegerEuclidean extends java.lang.Object implements DiversityInteger
TheDiversityIntegerEuclidean
is an implementation of theDiversityInteger
that calculates the diversity of twoIntegerGenotype
objects by normalizing the values to[0,1]
and calculating the Euclidean distance.
-
-
Constructor Summary
Constructors Constructor Description DiversityIntegerEuclidean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
diversity(org.opt4j.core.genotype.IntegerGenotype a, org.opt4j.core.genotype.IntegerGenotype b)
Returns the genetic diversity of twoGenotype
s.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opt4j.operators.diversity.Diversity
getOperatorType
-
-
-
-
Method Detail
-
diversity
public double diversity(org.opt4j.core.genotype.IntegerGenotype a, org.opt4j.core.genotype.IntegerGenotype b)
Description copied from interface:Diversity
Returns the genetic diversity of twoGenotype
s.
-
-