17 std::vector<double> sortedAbscissas, std::vector<double> ordinates) {
18 if (sortedAbscissas.empty())
19 throw std::invalid_argument(
"At least one interpolation point must be provided");
21 if (sortedAbscissas.size() != ordinates.size())
22 throw std::invalid_argument(
"The number of abscissas must be the same as that of ordinates");
33 const std::vector<double> &ordinates,
35 if (sortedAbscissas.size() == 1) {
static double interpolate(const std::vector< double > &sortedAbscissas, const std::vector< double > &ordinates, double abscissa)
Convenience function interpolating the data points (sortedAbscissas[i], ordinates[i]) at abscissa wit...
double operator()(double abscissa) const
Evaluate the interpolated function at abscissa.
std::vector< double > ordinates_
std::vector< double > abscissas_
PiecewiseLinearInterpolation(std::vector< double > sortedAbscissas, std::vector< double > ordinates)
Create an object representing a piecewise linear interpolation of the data points (sortedAbscissas[i]...
void vert_interp_apply_f90(const int &nlev, const double *fvec, double &f, const int &wi, const double &wf)
void vert_interp_weights_f90(const int &nlev, const double &obl, const double *vec, int &wi, double &wf)
Interface to Fortran vertical interpolation routines.