O_SESSAME::Interpolator Class Reference
[Interpolation Library]

#include <Interpolator.h>

Inheritance diagram for O_SESSAME::Interpolator:

Inheritance graph
[legend]
List of all members.

Detailed Description

Abstract interface to the set of interpolators.

Definition at line 52 of file Interpolator.h.

Public Member Functions

virtual ~Interpolator ()
 Default Deconstructor.

virtual void Interpolate (const Vector &_timePoints, const Matrix &_dataPoints)=0
 Standard Interpolation Function.

virtual Vector Evaluate (const double &_inputPoint)=0
 Evaluate interpolation curve at a specified time.

virtual int GetNumberDataPoints ()=0
 Returns the number of data points required for interpolation.

virtual Interpolator * NewPointer ()=0
 Return a pointer to a new instance of a derived interpolator type.

virtual Interpolator * Clone ()=0
 Return a pointer to a copy of a derived interpolator type.

virtual bool GetValid ()
 Returns whether the current interpolation parameters are valid.


Protected Member Functions

virtual void SetValid (const bool &_newValidValue)
 Sets the validity value of the interpolation parameters.

 Interpolator ()
 Default constructor. Does nothing since this is an abstract class.


Private Attributes

bool m_Valid
 Internal storage of the interpolation's "validity".


Constructor & Destructor Documentation

virtual O_SESSAME::Interpolator::~Interpolator  )  [virtual]
 

Default Deconstructor.

Definition at line 56 of file Interpolator.h.

O_SESSAME::Interpolator::Interpolator  )  [protected]
 

Default constructor. Does nothing since this is an abstract class.

Specifically, it sets the default value of the m_Valid flag.

Definition at line 128 of file Interpolator.h.


Member Function Documentation

virtual void O_SESSAME::Interpolator::Interpolate const Vector _timePoints,
const Matrix _dataPoints
[pure virtual]
 

Standard Interpolation Function.

Parameters:
_timePoints Vector of time (seconds) points of the data values.
_dataPoints Matrix of data points at each time step in the _timePoints vector.

Implemented in O_SESSAME::LinearInterpolator, and O_SESSAME::NaturalCubicSplineInterpolator.

virtual Vector O_SESSAME::Interpolator::Evaluate const double &  _inputPoint  )  [pure virtual]
 

Evaluate interpolation curve at a specified time.

Output = m_Slope * _inputPoint + m_Offset

Parameters:
_inputPoint Input point (time) at which to evaluate the vector of interpolations.
Returns:
Vector of output values from the evaluated interpolation.

Implemented in O_SESSAME::LinearInterpolator, and O_SESSAME::NaturalCubicSplineInterpolator.

virtual int O_SESSAME::Interpolator::GetNumberDataPoints  )  [pure virtual]
 

Returns the number of data points required for interpolation.

the number of data points is the number of X-values (time) required to interpolate.

Returns:
the number of data points, centered about the evaluation time, req'd to interpolate.

Implemented in O_SESSAME::LinearInterpolator, and O_SESSAME::NaturalCubicSplineInterpolator.

virtual Interpolator* O_SESSAME::Interpolator::NewPointer  )  [pure virtual]
 

Return a pointer to a new instance of a derived interpolator type.

This is used to request memory for a new instance of a derived instance when the actual type of the derived object is unknown. By calling this function, the compiler links to the correct derived function to return a pointer and allocate memory of the correct type.

Example:
 Interpolator* newInterp = oldInterp->NewPointer();
Returns:
a pointer to a new allocation of memory for the appropriate interpolator.

Implemented in O_SESSAME::LinearInterpolator, and O_SESSAME::NaturalCubicSplineInterpolator.

virtual Interpolator* O_SESSAME::Interpolator::Clone  )  [pure virtual]
 

Return a pointer to a copy of a derived interpolator type.

This is used to request memory for and copy of an instance of a derived representation when the actual type of the derived object is unknown. By calling this function, the compiler links to the correct derived function to return a pointer and allocate memory of the correct type and copy the data.

Example:
 Interpolator* newInterp = oldInterp->Clone();
Returns:
a pointer to a copy of the appropriate interpolator.

Implemented in O_SESSAME::LinearInterpolator, and O_SESSAME::NaturalCubicSplineInterpolator.

virtual bool O_SESSAME::Interpolator::GetValid  )  [virtual]
 

Returns whether the current interpolation parameters are valid.

Returns:
TRUE if the current interpolation is valid, FALSE if it is not and should not be used to Evaluate without being reinterpolated.

Definition at line 116 of file Interpolator.h.

virtual void O_SESSAME::Interpolator::SetValid const bool &  _newValidValue  )  [protected, virtual]
 

Sets the validity value of the interpolation parameters.

Definition at line 122 of file Interpolator.h.


Member Data Documentation

bool O_SESSAME::Interpolator::m_Valid [private]
 

Internal storage of the interpolation's "validity".

Definition at line 132 of file Interpolator.h.


Generated on Wed Aug 6 12:59:31 2003 for Open-Sessame Framework by doxygen1.3