R
- The type of the problem boundspublic class ParallelProblem<R> extends java.lang.Object implements VectorProblem<R>
A parallel problem that is bounded by the following hypercube
[min, max] x [min, max] x ... x [min, max]
Modifier and Type | Field and Description |
---|---|
private int |
dimension |
private R |
max |
private R |
min |
Constructor and Description |
---|
ParallelProblem(int dimension,
R min,
R max)
Creates a ParallelRoblem with a range of [min, max] and a given dimension.
|
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.
|
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)