Top Description Fields Constructors Methods
org.apache.commons.math3.fitting

public Class WeightedObservedPoints

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.util.List, .ArrayList, java.io.Serializable

Simple container for weighted observed points used in curve fitting algorithms.
Since
3.3

Field Summary

Modifier and TypeField and Description
private final List<WeightedObservedPoint>
observations

Observed points.

private static final long
serialVersionUID

Serializable version id.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(double
Abscissa of the point.
x
,
double
Observed value at x. After fitting we should have f(x) as close as possible to this value.
y
)

Adds a point to the sample.

public void
add(double
Weight of the observed point.
weight
,
double
Abscissa of the point.
x
,
double
Observed value at x. After fitting we should have f(x) as close as possible to this value.
y
)

Adds a point to the sample.

public void
add(WeightedObservedPoint
Observed point to add.
observed
)

Adds a point to the sample.

public void
clear()

Removes all observations from this container.

public List<WeightedObservedPoint>

Returns:

the observed points, in the order they were added to this container.
toList
()

Gets a snapshot of the observed points.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

observationsback to summary
private final List<WeightedObservedPoint> observations

Observed points.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version id.

Constructor Detail

WeightedObservedPointsback to summary
public WeightedObservedPoints()

Method Detail

addback to summary
public void add(double x, double y)

Adds a point to the sample. Calling this method is equivalent to calling add(1.0, x, y).

Parameters
x:double

Abscissa of the point.

y:double

Observed value at x. After fitting we should have f(x) as close as possible to this value.

See Also
add(double, double, double), add(WeightedObservedPoint), toList()
addback to summary
public void add(double weight, double x, double y)

Adds a point to the sample.

Parameters
weight:double

Weight of the observed point.

x:double

Abscissa of the point.

y:double

Observed value at x. After fitting we should have f(x) as close as possible to this value.

See Also
add(double, double), add(WeightedObservedPoint), toList()
addback to summary
public void add(WeightedObservedPoint observed)

Adds a point to the sample.

Parameters
observed:WeightedObservedPoint

Observed point to add.

See Also
add(double, double), add(double, double, double), toList()
clearback to summary
public void clear()

Removes all observations from this container.

toListback to summary
public List<WeightedObservedPoint> toList()

Gets a snapshot of the observed points. The list of stored points is copied in order to ensure that modification of the returned instance does not affect this container. Conversely, further modification of this container (through the add or clear methods) will not affect the returned list.

Returns:List<WeightedObservedPoint>

the observed points, in the order they were added to this container.

See Also
add(double, double), add(double, double, double), add(WeightedObservedPoint)