Class IntegerBounds

java.lang.Object
org.opt4j.genotype.IntegerBounds
All Implemented Interfaces:
Bounds<Integer>

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

    • lower

      protected final int[] lower
    • upper

      protected final int[] upper
  • Constructor Details

    • IntegerBounds

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

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

    • getLowerBound

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

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