Top Description Inners Fields Constructors Methods
org.apache.commons.math3.optimization

public Class PointValuePair

extends Pair<double[], Double>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@Deprecated
Imports
java.io.Serializable, org.apache.commons.math3.util.Pair

Deprecated

As of 3.1 (to be removed in 4.0).

This class holds a point and the value of an objective function at that point.
Since
3.0
See Also
PointVectorValuePair, org.apache.commons.math3.analysis.MultivariateFunction

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
PointValuePair.DataTransferObject

Internal class used only for serialization.

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Serializable UID.

Constructor Summary

AccessConstructor and Description
public
PointValuePair(final double[]
Point coordinates. This instance will store a copy of the array, not the array passed as argument.
point
,
final double
Value of the objective function at the point.
value
)

Builds a point/objective function value pair.

public
PointValuePair(final double[]
Point coordinates.
point
,
final double
Value of the objective function at the point.
value
,
final boolean
if true, the input array will be copied, otherwise it will be referenced.
copyArray
)

Builds a point/objective function value pair.

Method Summary

Modifier and TypeMethod and Description
public double[]

Returns:

a copy of the stored point.
getPoint
()

Gets the point.

public double[]

Returns:

a reference to the internal array storing the point.
getPointRef
()

Gets a reference to the point.

private Object

Returns:

data transfer object that will be serialized
writeReplace
()

Replace the instance with a data transfer object for serialization.

Inherited from org.apache.commons.math3.util.Pair:
createequalsgetFirstgetKeygetSecondgetValuehashCodetoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable UID.

Constructor Detail

PointValuePairback to summary
public PointValuePair(final double[] point, final double value)

Builds a point/objective function value pair.

Parameters
point:double[]

Point coordinates. This instance will store a copy of the array, not the array passed as argument.

value:double

Value of the objective function at the point.

PointValuePairback to summary
public PointValuePair(final double[] point, final double value, final boolean copyArray)

Builds a point/objective function value pair.

Parameters
point:double[]

Point coordinates.

value:double

Value of the objective function at the point.

copyArray:boolean

if true, the input array will be copied, otherwise it will be referenced.

Method Detail

getPointback to summary
public double[] getPoint()

Gets the point.

Returns:double[]

a copy of the stored point.

getPointRefback to summary
public double[] getPointRef()

Gets a reference to the point.

Returns:double[]

a reference to the internal array storing the point.

writeReplaceback to summary
private Object writeReplace()

Replace the instance with a data transfer object for serialization.

Returns:Object

data transfer object that will be serialized

org.apache.commons.math3.optimization back to summary

private Class PointValuePair.DataTransferObject

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • org.apache.commons.math3.optimization.PointValuePair.DataTransferObject
All Implemented Interfaces
java.io.Serializable

Internal class used only for serialization.

Field Summary

Modifier and TypeField and Description
private final double[]
point

Point coordinates.

private static final long
serialVersionUID

Serializable UID.

private final double
value

Value of the objective function at the point.

Constructor Summary

AccessConstructor and Description
pack-priv
DataTransferObject(final double[]
Point coordinates.
point
,
final double
Value of the objective function at the point.
value
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
private Object

Returns:

replacement PointValuePair
readResolve
()

Replace the deserialized data transfer object with a PointValuePair.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pointback to summary
private final double[] point

Point coordinates.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable UID.

valueback to summary
private final double value

Value of the objective function at the point.

Constructor Detail

DataTransferObjectback to summary
pack-priv DataTransferObject(final double[] point, final double value)

Simple constructor.

Parameters
point:double[]

Point coordinates.

value:double

Value of the objective function at the point.

Method Detail

readResolveback to summary
private Object readResolve()

Replace the deserialized data transfer object with a PointValuePair.

Returns:Object

replacement PointValuePair