//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Cubic spline on BSpline basis // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM // Felix Boehmer TUM // //----------------------------------------------------------- #ifndef CUBSPLINE_H #define CUBSPLINE_H // Base Class Headers ---------------- // Collaborating Class Headers ------- #include #include "BSpline.h" class CubSpline { friend class CubSplineFitter; public: // Constructors/Destructors --------- CubSpline(const std::vector* k, std::vector* c=NULL); ~CubSpline(); //NOTE: There have to be 4 ADDITIONAL points before (after) the first //(last) knot outside the data area!!! // Operators // Accessors ----------------------- const std::vector* getKnots() {return _k;} std::vector* getCoeffs() {return _c;} // Modifiers ----------------------- void setCoeffs(std::vector* c) {_c = c;} //Parameter Interface void setCoeffsByArray(double*); // Operations ---------------------- double eval(double x); private: // Private Data Members ------------ std::vector _M; const std::vector* _k; // knots std::vector* _c; // coefficients int _n; // Private Methods ----------------- }; #endif //-------------------------------------------------------------- // $Log$ //--------------------------------------------------------------