org.opt4j.core.genotype
Class IntegerBounds

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

public class IntegerBounds
extends java.lang.Object
implements Bounds<java.lang.Integer>

The IntegerBounds is an implementation of the Bounds for the IntegerGenotype that accepts arrays as well as lists for as bounds.


Field Summary
protected  int[] lower
           
protected  int[] upper
           
 
Constructor Summary
IntegerBounds(int[] lower, int[] upper)
          Constructs a IntegerBounds with arrays.
IntegerBounds(java.util.List<java.lang.Integer> lower, java.util.List<java.lang.Integer> upper)
          Constructs a IntegerBounds with lists.
 
Method Summary
 java.lang.Integer getLowerBound(int index)
          Returns the lower bound for the i-th element.
 java.lang.Integer 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 int[] lower

upper

protected final int[] upper
Constructor Detail

IntegerBounds

public IntegerBounds(int[] lower,
                     int[] upper)
Constructs a IntegerBounds with arrays.

Parameters:
lower - the lower bounds
upper - the upper bounds

IntegerBounds

public IntegerBounds(java.util.List<java.lang.Integer> lower,
                     java.util.List<java.lang.Integer> upper)
Constructs a IntegerBounds with lists.

Parameters:
lower - the lower bounds
upper - the upper bounds
Method Detail

getLowerBound

public java.lang.Integer 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.Integer>
Parameters:
index - the i-th element
Returns:
the lower bound of the i-th element

getUpperBound

public java.lang.Integer 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.Integer>
Parameters:
index - the i-th element
Returns:
the upper bound of the i-th element