Class DiversityBooleanFraction

  • All Implemented Interfaces:
    org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.BooleanGenotype>, Diversity<org.opt4j.core.genotype.BooleanGenotype>, DiversityBoolean

    public class DiversityBooleanFraction
    extends java.lang.Object
    implements DiversityBoolean
    The DiversityBooleanFraction calculates the Diversity between two BooleanGenotypes by calculating the fraction of different vector entries.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double diversity​(org.opt4j.core.genotype.BooleanGenotype a, org.opt4j.core.genotype.BooleanGenotype 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

      • DiversityBooleanFraction

        public DiversityBooleanFraction()
    • Method Detail

      • diversity

        public double diversity​(org.opt4j.core.genotype.BooleanGenotype a,
                                org.opt4j.core.genotype.BooleanGenotype b)
        Description copied from interface: Diversity
        Returns the genetic diversity of two Genotypes.
        Specified by:
        diversity in interface Diversity<org.opt4j.core.genotype.BooleanGenotype>
        Parameters:
        a - the first genotype
        b - the second genotype
        Returns:
        the diversity of two genotypes