Package org.opt4j.genotype
Class IntegerBounds
java.lang.Object
org.opt4j.genotype.IntegerBounds
The
IntegerBounds
is an implementation of the Bounds
for the
IntegerGenotype
that accepts arrays as well as lists for as bounds.-
Field Summary
-
Constructor Summary
ConstructorDescriptionIntegerBounds
(int[] lower, int[] upper) Constructs aIntegerBounds
with arrays.IntegerBounds
(List<Integer> lower, List<Integer> upper) Constructs aIntegerBounds
with lists. -
Method Summary
Modifier and TypeMethodDescriptiongetLowerBound
(int index) Returns the lower bound for thei
-th element.getUpperBound
(int index) Returns the upper bound for thei
-th element.
-
Field Details
-
lower
protected final int[] lower -
upper
protected final int[] upper
-
-
Constructor Details
-
IntegerBounds
public IntegerBounds(int[] lower, int[] upper) Constructs aIntegerBounds
with arrays.- Parameters:
lower
- the lower boundsupper
- the upper bounds
-
IntegerBounds
Constructs aIntegerBounds
with lists.- Parameters:
lower
- the lower boundsupper
- the upper bounds
-
-
Method Details
-
getLowerBound
Description copied from interface:Bounds
Returns the lower bound for thei
-th element.- Specified by:
getLowerBound
in interfaceBounds<Integer>
- Parameters:
index
- thei
-th element- Returns:
- the lower bound of the
i
-th element
-
getUpperBound
Description copied from interface:Bounds
Returns the upper bound for thei
-th element.- Specified by:
getUpperBound
in interfaceBounds<Integer>
- Parameters:
index
- thei
-th element- Returns:
- the upper bound of the
i
-th element
-