Herwig 7.3.0
|
A linear interpolation allowing for inversion of the linear interpolation. More...
#include <linear_interpolator.h>
Public Member Functions | |
linear_interpolator () | |
default constructor | |
linear_interpolator (const std::map< double, double > &points) | |
construct a linear interpolator given the map of interpolation points and values | |
double | operator() (double x) const |
return the interpolations value at the given point | |
std::pair< double, double > | range () const |
return the range of the interpolation | |
bool | invertible (double f) const |
return true, if an inverse exists for the given value | |
double | unique_inverse (double f) const |
return the inverse, assuming the inverse is unique | |
std::map< double, double > & | interpolation () |
access the interpolation map | |
void | set_interpolation (double point, double value) |
set the value at the given point | |
void | reset () |
reset after interpolation points have been changed | |
template<class OStream > | |
void | put (OStream &os) const |
put to ostream | |
template<class IStream > | |
void | get (IStream &is) |
get from istream | |
Private Attributes | |
std::map< double, double > | interpolation_ |
map points to values | |
std::pair< double, double > | range_ |
the range of the interpolation | |
A linear interpolation allowing for inversion of the linear interpolation.
Definition at line 42 of file linear_interpolator.h.
|
inline |
access the interpolation map
Definition at line 75 of file linear_interpolator.h.
References interpolation_.
|
inline |
return true, if an inverse exists for the given value
Definition at line 65 of file linear_interpolator.h.
References range_.
|
inline |
return the range of the interpolation
Definition at line 59 of file linear_interpolator.h.
References range_.
|
private |
map points to values
Definition at line 98 of file linear_interpolator.h.
Referenced by interpolation().
|
private |
the range of the interpolation
Definition at line 101 of file linear_interpolator.h.
Referenced by invertible(), and range().