herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
exsample::linear_interpolator Class Reference

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
 

Detailed Description

A linear interpolation allowing for inversion of the linear interpolation.

Definition at line 42 of file linear_interpolator.h.


The documentation for this class was generated from the following file: