Class DoubleBounds

  • All Implemented Interfaces:
    Bounds<java.lang.Double>

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

      Fields 
      Modifier and Type Field Description
      protected double[] lower  
      protected double[] upper  
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleBounds​(double[] lower, double[] upper)
      Constructs a DoubleBounds with arrays.
      DoubleBounds​(java.util.List<java.lang.Double> lower, java.util.List<java.lang.Double> upper)
      Constructs a DoubleBounds with lists.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double getLowerBound​(int index)
      Returns the lower bound for the i-th element.
      java.lang.Double getUpperBound​(int index)
      Returns the upper bound for the i-th element.
      • Methods inherited from class java.lang.Object

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

      • lower

        protected final double[] lower
      • upper

        protected final double[] upper
    • Constructor Detail

      • DoubleBounds

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

        public DoubleBounds​(java.util.List<java.lang.Double> lower,
                            java.util.List<java.lang.Double> upper)
        Constructs a DoubleBounds with lists.
        Parameters:
        lower - the lower bounds
        upper - the upper bounds
    • Method Detail

      • getLowerBound

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

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