public class RealPointValuePair extends Object implements Serializable
This is a simple immutable container.
VectorialPointValuePair
,
MultivariateRealFunction
,
Serialized FormModifier and Type | Field and Description |
---|---|
private double[] |
point
Point coordinates.
|
private static long |
serialVersionUID
Serializable version identifier.
|
private double |
value
Value of the objective function at the point.
|
Constructor and Description |
---|
RealPointValuePair(double[] point,
double value)
Build a point/objective function value pair.
|
RealPointValuePair(double[] point,
double value,
boolean copyArray)
Build a point/objective function value pair.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getPoint()
Get the point.
|
double[] |
getPointRef()
Get a reference to the point.
|
double |
getValue()
Get the value of the objective function.
|
private static final long serialVersionUID
private final double[] point
private final double value
public RealPointValuePair(double[] point, double value)
point
- point coordinates (the built instance will store
a copy of the array, not the array passed as argument)value
- value of an objective function at the pointpublic RealPointValuePair(double[] point, double value, boolean copyArray)
point
- point coordinates (the built instance will store
a copy of the array, not the array passed as argument)value
- value of an objective function at the pointcopyArray
- if true, the input array will be copied, otherwise
it will be referencedpublic double[] getPoint()
public double[] getPointRef()
This method is provided as a convenience to avoid copying the array, the elements of the array should not be modified.
public double getValue()
Copyright (c) 2003-2014 Apache Software Foundation