R
- The type of the problem boundspublic class NonParallelProblem<R> extends java.lang.Object implements VectorProblem<R>
A non parallel problem that is bounded by the following domain:
[min[0], max[0]] x [min[1], max[1]] x ... x [min[dimension-1], max[dimension-1]]
Modifier and Type | Field and Description |
---|---|
private int |
dimension |
private R[] |
max |
private R[] |
min |
Constructor and Description |
---|
NonParallelProblem(R[] min,
R[] max)
Creates a NonParallelProblem with the given upper and lower bounds.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkDimension(int atDimension) |
int |
dimension()
Returns the problem’s dimension.
|
R |
lowerBound(int atDimension)
Returns the problem’s lower bound in a given dimension, indexed from 0.
|
R |
upperBound(int atDimension)
Returns the problem’s upper bound in a given dimension, indexed from 0.
|
private final int dimension
private final R[] min
private final R[] max
public final int dimension()
VectorProblem
Returns the problem’s dimension.
dimension
in interface VectorProblem<R>
public final R lowerBound(int atDimension)
VectorProblem
Returns the problem’s lower bound in a given dimension, indexed from 0. It must be not greater than the VectorProblem.upperBound(int)
in the same dimension.
lowerBound
in interface VectorProblem<R>
atDimension
- the given dimensionpublic final R upperBound(int atDimension)
VectorProblem
Returns the problem’s upper bound in a given dimension, indexed from 0. It must be not smaller than the VectorProblem.lowerBound(int)
in the same dimension.
upperBound
in interface VectorProblem<R>
atDimension
- the given dimensionprivate void checkDimension(int atDimension)