18 std::vector<double> *
X;
19 std::vector<double> *
Y;
47 else if(x >= (*X).back())
50 std::vector<double>::iterator itHi = std::lower_bound((*X).begin(), (*X).end(), x);
51 ihi = itHi - (*X).begin();
72 if((*X).size()!=(*Y).size()){
73 std::cout << std::endl <<
"Error in interp_linear: X, Y need same size" << std::endl;
77 for(
int i=1; i<
nxy-1; i++)
78 if( ((*
X)[i] == (*
X)[i-1]) ||
79 ((*
X)[i] == (*
X)[i+1]) ||
80 ((*
X)[i]<(*
X)[i-1] && (*
X)[i]<(*
X)[i+1]) ||
81 ((*
X)[i]>(*
X)[i-1] && (*
X)[i]>(*
X)[i+1]) ){
82 std::cout << std::endl <<
"Error in linearInterp: X should be monotonic" << std::endl;
int ilo
lower of adjacent bounding grid points for desired interpolation point
std::vector< double > * X
abscissas for Y(X)
linearInterp(std::vector< double > &_X, std::vector< double > &_Y)
int ihi
upper of adjacent bounding grid points for desired interpolation point
void set_bounding_indicies(double x)
int nxy
number of grid points
linearInterp()
Default (empty) constructor.
std::vector< double > * Y
ordinate values for Y(X)