Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Mezzanine::CubicSpline< TimeSeriesType, DataSeriesType > Class Template Reference

A class for interpolating data with arbitrary. More...

#include <cubicspline.h>

+ Collaboration diagram for Mezzanine::CubicSpline< TimeSeriesType, DataSeriesType >:

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_typeContainerType
 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)
 

Detailed Description

template<typename TimeSeriesType, typename DataSeriesType>
class Mezzanine::CubicSpline< TimeSeriesType, DataSeriesType >

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.

Constructor & Destructor Documentation

template<typename TimeSeriesType, typename DataSeriesType>
Mezzanine::CubicSpline< TimeSeriesType, DataSeriesType >::CubicSpline ( const std::vector< DataSeriesType > &  y)
inline

Create a Spline with a time series spread evenly between 0 and 1.

Parameters
yThe data series.

Definition at line 129 of file cubicspline.h.

Member Function Documentation

template<typename TimeSeriesType, typename DataSeriesType>
void Mezzanine::CubicSpline< TimeSeriesType, DataSeriesType >::push_back ( const DataSeriesType &  DataToAdd)
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.


The documentation for this class was generated from the following file: