Package org.hipparchus.optim
Class PointValuePair
java.lang.Object
org.hipparchus.util.Pair<double[],Double>
org.hipparchus.optim.PointValuePair
- All Implemented Interfaces:
Serializable
This class holds a point and the value of an objective function at
that point.
-
Constructor Summary
ConstructorDescriptionPointValuePair
(double[] point, double value) Builds a point/objective function value pair.PointValuePair
(double[] point, double value, boolean copyArray) Builds a point/objective function value pair. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getPoint()
Gets the point.double[]
Gets a reference to the point.
-
Constructor Details
-
PointValuePair
public PointValuePair(double[] point, double value) Builds a point/objective function value pair.- Parameters:
point
- Point coordinates. This instance will store a copy of the array, not the array passed as argument.value
- Value of the objective function at the point.
-
PointValuePair
public PointValuePair(double[] point, double value, boolean copyArray) Builds a point/objective function value pair.- Parameters:
point
- Point coordinates.value
- Value of the objective function at the point.copyArray
- iftrue
, the input array will be copied, otherwise it will be referenced.
-
-
Method Details
-
getPoint
public double[] getPoint()Gets the point.- Returns:
- a copy of the stored point.
-
getPointRef
public double[] getPointRef()Gets a reference to the point.- Returns:
- a reference to the internal array storing the point.
-