Documentation of 'org.apache.commons.math3.genetics.BinaryChromosome' Java class
BinaryChromosome
org.apache.commons.math3.genetics

Class BinaryChromosome

  • All Implemented Interfaces:
    java.lang.Comparable<Chromosome>, Fitness


    public abstract class BinaryChromosome
    extends AbstractListChromosome<java.lang.Integer>
    Chromosome represented by a vector of 0s and 1s.
    Since:
    2.0
    • Constructor Detail

      • BinaryChromosome

        public BinaryChromosome(java.util.List<java.lang.Integer> representation)
                         throws InvalidRepresentationException
        Constructor.
        Parameters:
        representation - list of {0,1} values representing the chromosome
        Throws:
        InvalidRepresentationException - iff the representation can not represent a valid chromosome
      • BinaryChromosome

        public BinaryChromosome(java.lang.Integer[] representation)
                         throws InvalidRepresentationException
        Constructor.
        Parameters:
        representation - array of {0,1} values representing the chromosome
        Throws:
        InvalidRepresentationException - iff the representation can not represent a valid chromosome
    • Method Detail

      • randomBinaryRepresentation

        public static java.util.List<java.lang.Integer> randomBinaryRepresentation(int length)
        Returns a representation of a random binary array of length length.
        Parameters:
        length - length of the array
        Returns:
        a random binary array of length length

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.