NaturalCubicSplineInterpolator.h

Go to the documentation of this file.
00001 
00002 
00008 /*
00009 */
00011 
00012 #ifndef __SSF_NATURAL_CUBIC_SPLINE_INTERPOLATOR_H__
00013 #define __SSF_NATURAL_CUBIC_SPLINE_INTERPOLATOR_H__
00014 
00015 #include <Matrix.h>
00016 #include "Interpolator.h"
00017 
00018 namespace O_SESSAME {
00024 class NaturalCubicSplineInterpolator : public Interpolator
00025 {
00026 public:
00030     NaturalCubicSplineInterpolator();
00031     
00035     NaturalCubicSplineInterpolator(const Vector& _inputPoints, const Matrix& _outputPoints);
00036     
00044     virtual void Interpolate(const Vector& _timePoints, const Matrix& _dataPoints);
00045         
00052     virtual Vector Evaluate(const double& _inputPoint);
00053     
00059     virtual int GetNumberDataPoints()   {return m_NumDataPoints;};
00060 
00068     virtual NaturalCubicSplineInterpolator* NewPointer();
00069     
00077     virtual NaturalCubicSplineInterpolator* Clone();
00078     
00079 protected:
00083     void BuildNaturalCubicSplineInterpolation(const double& _x1, const double& _y1, const double& _x2, const double& _y2, double& _Slope, double& _Offset);
00084     
00086     virtual void SetNumberDataPoints(const int& _numberDataPoints) {};    
00087 
00088 private:
00090     int m_NumDataPoints;
00092     int m_NumElements;
00093 
00094     Matrix m_Acoeff;
00095     Matrix m_Bcoeff;
00096     Matrix m_Ccoeff;
00097     Matrix m_Dcoeff;
00098     
00099     Vector m_tempOutput; // this is faster, but larger could be a problem for big histories
00100     
00101 };
00102 
00103 #endif 
00104 } // close namespace O_SESSAME
00105 
00106 
00107 // Do not change the comments below - they will be added automatically by CVS
00108 /*****************************************************************************
00109 *       $Log: Integrator.h,v $
00110 *
00111 ******************************************************************************/

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