Package org.opt4j.genotype
Class DoubleBounds
java.lang.Object
org.opt4j.genotype.DoubleBounds
The
DoubleBounds
is an implementation of the Bounds
for the
DoubleGenotype
that accepts arrays as well as lists for as bounds.-
Field Summary
-
Constructor Summary
ConstructorDescriptionDoubleBounds
(double[] lower, double[] upper) Constructs aDoubleBounds
with arrays.DoubleBounds
(List<Double> lower, List<Double> upper) Constructs aDoubleBounds
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 double[] lower -
upper
protected final double[] upper
-
-
Constructor Details
-
DoubleBounds
public DoubleBounds(double[] lower, double[] upper) Constructs aDoubleBounds
with arrays.- Parameters:
lower
- the lower boundsupper
- the upper bounds
-
DoubleBounds
Constructs aDoubleBounds
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<Double>
- 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<Double>
- Parameters:
index
- thei
-th element- Returns:
- the upper bound of the
i
-th element
-