UFO
|
Represents a piecewise linear interpolation of a set of data points. More...
#include <PiecewiseLinearInterpolation.h>
Public Member Functions | |
PiecewiseLinearInterpolation (std::vector< double > sortedAbscissas, std::vector< double > ordinates) | |
Create an object representing a piecewise linear interpolation of the data points (sortedAbscissas[i], ordinates[i]). More... | |
double | operator() (double abscissa) const |
Evaluate the interpolated function at abscissa . More... | |
Static Public Member Functions | |
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 without creating a PiecewiseLinearInterpolation object. More... | |
Private Attributes | |
std::vector< double > | abscissas_ |
std::vector< double > | ordinates_ |
Represents a piecewise linear interpolation of a set of data points.
Definition at line 16 of file src/ufo/utils/PiecewiseLinearInterpolation.h.
ufo::PiecewiseLinearInterpolation::PiecewiseLinearInterpolation | ( | std::vector< double > | sortedAbscissas, |
std::vector< double > | ordinates | ||
) |
Create an object representing a piecewise linear interpolation of the data points (sortedAbscissas[i], ordinates[i]).
Both arguments must have the same length and be non-empty. The elements of sortedAbscissas
must be sorted.
Definition at line 16 of file PiecewiseLinearInterpolation.cc.
|
static |
Convenience function interpolating the data points (sortedAbscissas[i], ordinates[i]) at abscissa
without creating a PiecewiseLinearInterpolation object.
Definition at line 32 of file PiecewiseLinearInterpolation.cc.
double ufo::PiecewiseLinearInterpolation::operator() | ( | double | abscissa | ) | const |
Evaluate the interpolated function at abscissa
.
Definition at line 28 of file PiecewiseLinearInterpolation.cc.
|
private |
Definition at line 37 of file src/ufo/utils/PiecewiseLinearInterpolation.h.
|
private |
Definition at line 38 of file src/ufo/utils/PiecewiseLinearInterpolation.h.