22 #ifndef __PLUMED_tools_CubicInterpolation_h
23 #define __PLUMED_tools_CubicInterpolation_h
27 #include "core/Value.h"
36 unsigned search1(
const unsigned& kk,
const double& x,
const unsigned& jold )
const ;
38 std::vector<double>
lb,
ub;
40 unsigned findBox(
const std::vector<double>& pos );
44 CInterpolation(
const std::vector<unsigned>& dd,
const std::vector<double>& fmin,
const std::vector<double>& fmax );
48 void getSplinePoint(
const unsigned nn, std::vector<double>& pp )
const ;
49 void getGridBoundaries( std::vector<double>& gmin, std::vector<double>& gmax )
const ;
50 virtual void set_table(
const std::vector<Value>& ff )=0;
51 virtual double get_fdf(
const std::vector<double>& pos )=0;
74 unsigned iplus, iminus; iplus=(i+1)*
stride[0]; iminus=(i-1)*
stride[0];
87 InterpolateCubic(
const std::vector<unsigned>& dd,
const std::vector<double>& fmin,
const std::vector<double>& fmax );
88 void set_table(
const std::vector<Value>& ff );
89 double get_fdf(
const std::vector<double>& pos );
95 std::vector<double>
t1,
t2;
98 void IBicCoeff(
const std::vector<double>& y,
const std::vector<double>& dy1,
const std::vector<double>& dy2,
99 const std::vector<double>& d2y12,
const double& d1,
const double& d2,
Matrix<double>& c );
101 InterpolateBicubic(
const std::vector<unsigned>& dd,
const std::vector<double>& fmin,
const std::vector<double>& fmax );
102 void set_table(
const std::vector<Value>& ff );
103 double get_fdf(
const std::vector<double>& pos );
virtual void set_table(const std::vector< Value > &ff)=0
double getPointSpacing(const unsigned dir, const unsigned k) const
virtual ~CInterpolation()
Matrix< double > splinepoints
unsigned ncols() const
Return the number of columns.
double getCrossTermDenominator(const unsigned i, const unsigned j) const
InterpolateBicubic(const std::vector< unsigned > &dd, const std::vector< double > &fmin, const std::vector< double > &fmax)
double get_fdf(const std::vector< double > &pos)
std::vector< double > clist
void set_table(const std::vector< Value > &ff)
void getNumbersOfPoints(std::vector< unsigned > &nspline) const
std::vector< unsigned > np
unsigned findBox(const std::vector< double > &pos)
unsigned search1(const unsigned &kk, const double &x, const unsigned &jold) const
virtual double get_fdf(const std::vector< double > &pos)=0
unsigned nrows() const
Return the number of rows.
std::vector< unsigned > stride
double get_fdf(const std::vector< double > &pos)
unsigned getNumberOfSplinePoints() const
std::vector< double > clist
void set_table(const std::vector< Value > &ff)
void getGridBoundaries(std::vector< double > &gmin, std::vector< double > &gmax) const
void getSplinePoint(const unsigned nn, std::vector< double > &pp) const
CInterpolation(const std::vector< unsigned > &dd, const std::vector< double > &fmin, const std::vector< double > &fmax)
void IBicCoeff(const std::vector< double > &y, const std::vector< double > &dy1, const std::vector< double > &dy2, const std::vector< double > &d2y12, const double &d1, const double &d2, Matrix< double > &c)
InterpolateCubic(const std::vector< unsigned > &dd, const std::vector< double > &fmin, const std::vector< double > &fmax)