Class DoubleBounds

java.lang.Object
org.opt4j.genotype.DoubleBounds
All Implemented Interfaces:
Bounds<Double>

public class DoubleBounds extends Object implements Bounds<Double>
The DoubleBounds is an implementation of the Bounds for the DoubleGenotype that accepts arrays as well as lists for as bounds.
  • Field Details

    • lower

      protected final double[] lower
    • upper

      protected final double[] upper
  • Constructor Details

    • DoubleBounds

      public DoubleBounds(double[] lower, double[] upper)
      Constructs a DoubleBounds with arrays.
      Parameters:
      lower - the lower bounds
      upper - the upper bounds
    • DoubleBounds

      public DoubleBounds(List<Double> lower, List<Double> upper)
      Constructs a DoubleBounds with lists.
      Parameters:
      lower - the lower bounds
      upper - the upper bounds
  • Method Details

    • getLowerBound

      public Double getLowerBound(int index)
      Description copied from interface: Bounds
      Returns the lower bound for the i-th element.
      Specified by:
      getLowerBound in interface Bounds<Double>
      Parameters:
      index - the i-th element
      Returns:
      the lower bound of the i-th element
    • getUpperBound

      public Double getUpperBound(int index)
      Description copied from interface: Bounds
      Returns the upper bound for the i-th element.
      Specified by:
      getUpperBound in interface Bounds<Double>
      Parameters:
      index - the i-th element
      Returns:
      the upper bound of the i-th element