java.lang.Object | ||
↳ | org.rrd4j.data.Plottable | |
↳ | org.rrd4j.data.CubicSplineInterpolator |
Class used to interpolate datasource values from the collection of (timestamp, values) points using natural cubic spline interpolation.
WARNING: So far, this class cannot handle NaN datasource values (an exception will be thrown by the constructor). Future releases might change this.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates cubic spline interpolator from arrays of timestamps and corresponding
datasource values.
| |||||||||||
Creates cubic spline interpolator from arrays of Date objects and corresponding
datasource values.
| |||||||||||
Creates cubic spline interpolator from arrays of GregorianCalendar objects and corresponding
datasource values.
| |||||||||||
Creates cubic spline interpolator for an array of 2D-points.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculates spline-interpolated y-value for the corresponding x-value.
| |||||||||||
Method overriden from the base class.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates cubic spline interpolator from arrays of timestamps and corresponding datasource values.
timestamps | timestamps in seconds |
---|---|
values | corresponding datasource values |
IllegalArgumentException | Thrown if supplied arrays do not contain at least 3 values, or if timestamps are not ordered, or array lengths are not equal, or some datasource value is NaN. |
---|
Creates cubic spline interpolator from arrays of Date objects and corresponding datasource values.
dates | Array of Date objects |
---|---|
values | corresponding datasource values |
IllegalArgumentException | Thrown if supplied arrays do not contain at least 3 values, or if timestamps are not ordered, or array lengths are not equal, or some datasource value is NaN. |
---|
Creates cubic spline interpolator from arrays of GregorianCalendar objects and corresponding datasource values.
dates | Array of GregorianCalendar objects |
---|---|
values | corresponding datasource values |
IllegalArgumentException | Thrown if supplied arrays do not contain at least 3 values, or if timestamps are not ordered, or array lengths are not equal, or some datasource value is NaN. |
---|
Creates cubic spline interpolator for an array of 2D-points.
x | x-axis point coordinates |
---|---|
y | y-axis point coordinates |
IllegalArgumentException | Thrown if supplied arrays do not contain at least 3 values, or if timestamps are not ordered, or array lengths are not equal, or some datasource value is NaN. |
---|
Calculates spline-interpolated y-value for the corresponding x-value. Call this if you need spline-interpolated values in your code.
xval | x-value |
---|
Method overriden from the base class. This method will be called by the framework. Call this method only if you need spline-interpolated values in your code.
timestamp | timestamp in seconds |
---|