8 #ifndef UFO_UTILS_PIECEWISELINEARINTERPOLATION_H_
9 #define UFO_UTILS_PIECEWISELINEARINTERPOLATION_H_
25 std::vector<double> ordinates);
32 static double interpolate(
const std::vector<double> &sortedAbscissas,
33 const std::vector<double> &ordinates,
Represents a piecewise linear interpolation of a set of data points.
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]...