Class 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
    The DiversityIntegerEuclidean is an implementation of the DiversityInteger that calculates the diversity of two IntegerGenotype objects by normalizing the values to [0,1] and calculating the Euclidean distance.
    • 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 two Genotypes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DiversityIntegerEuclidean

        public DiversityIntegerEuclidean()
    • 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 two Genotypes.
        Specified by:
        diversity in interface Diversity<org.opt4j.core.genotype.IntegerGenotype>
        Parameters:
        a - the first genotype
        b - the second genotype
        Returns:
        the diversity of two genotypes