A class for interpolating data with arbitrary. More...
#include <cubicspline.h>
Public Types | |
typedef ContainerType::const_iterator | const_iterator |
An iterator suitable for the metadata this spline uses that will not allow changes to the underlying data. | |
typedef std::vector< element_type > | ContainerType |
The underlying type of the container that actually stores the instances of ContainerType. | |
typedef CubicSplineElement< TimeSeriesType, DataSeriesType > | element_type |
The meta data type stored by this container. | |
typedef ContainerType::iterator | iterator |
An iterator suitable for the metadata this spline uses. | |
Public Member Functions | |
CubicSpline () | |
Create an empty, invalid spline. | |
CubicSpline (const std::vector< DataSeriesType > &y) | |
Create a Spline with a time series spread evenly between 0 and 1. More... | |
CubicSpline (const std::vector< TimeSeriesType > &x, const std::vector< DataSeriesType > &y) | |
A spline with custom time and data series values. | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
DataSeriesType | interpolate (const TimeSeriesType &x) const |
std::vector< DataSeriesType > | interpolate (const std::vector< TimeSeriesType > &xx) const |
DataSeriesType | operator[] (const TimeSeriesType &x) const |
std::vector< DataSeriesType > | operator[] (const std::vector< TimeSeriesType > &xx) const |
void | push_back (const DataSeriesType &DataToAdd) |
Add another entry to the spline. More... | |
Public Attributes | |
ContainerType | DataElements |
The actual container of Metadata. | |
Protected Member Functions | |
void | CalculateElements (const std::vector< TimeSeriesType > &x, const std::vector< DataSeriesType > &y) |
A class for interpolating data with arbitrary.
Templated on type of X, Y. X and Y must have operator +, -, *, /. Y must have defined a constructor that takes a scalar.
Definition at line 109 of file cubicspline.h.
|
inline |
Create a Spline with a time series spread evenly between 0 and 1.
y | The data series. |
Definition at line 129 of file cubicspline.h.
|
inline |
Add another entry to the spline.
Adjust the time series to evenly distribute it between 0 and 1 for each entry, including the new one DataToAdd
Definition at line 173 of file cubicspline.h.