Class DoubleGenotype

    • Constructor Detail

      • DoubleGenotype

        public DoubleGenotype()
        Constructs a DoubleGenotype with lower bounds 0.0 and upper bounds 1.0.
      • DoubleGenotype

        public DoubleGenotype​(double lowerBound,
                              double upperBound)
        Constructs a DoubleGenotype with a specified lower and upper bound for all values.
        Parameters:
        lowerBound - the lower bound
        upperBound - the upper bound
    • Method Detail

      • getLowerBound

        public double getLowerBound​(int index)
        Returns the lower bound for the i-th element.
        Parameters:
        index - the i-th element
        Returns:
        the lower bound of the i-th element
      • getUpperBound

        public double getUpperBound​(int index)
        Returns the upper bound for the i-th element.
        Parameters:
        index - the i-th element
        Returns:
        the upper bound of the i-th element
      • newInstance

        public <G extends Genotype> G newInstance()
        Description copied from interface: Genotype
        Constructs a new (empty) instance of this Genotype.
        Specified by:
        newInstance in interface Genotype
        Type Parameters:
        G - the type of genotype for an implicit cast
        Returns:
        new instance of the genotype
      • init

        public void init​(Random random,
                         int n)
        Initialize this genotype with n random values.
        Parameters:
        random - the random number generator
        n - the number of elements in the resulting genotype