PYTHIA
8.312
|
#include <MathTools.h>
Public Member Functions | |
LinearInterpolator (double leftIn, double rightIn, vector< double > ysIn) | |
Constructor. | |
const vector< double > & | data () const |
Function to get y-values of interpolation data. | |
double | left () const |
x-values are linearly spaced on the interpolation region. | |
double | right () const |
double | dx () const |
double | xi (int i) const |
double | at (double x) const |
Get interpolated value at the specified point. More... | |
double | operator() (double x) const |
Hist | plot (string title) const |
Plot the data points of this LinearInterpolator in a histogram. | |
Hist | plot (string title, double xMin, double xMax) const |
double | sample (Rndm &rndm) const |
Sample a random number distributed as given by this LinearInterpolator. More... | |
LinearInterpolator class. Used to interpolate between values in linearly spaced data. The interpolation uses the arithmetic mean.
double at | ( | double | xIn | ) | const |
Get interpolated value at the specified point.
Operator to get interpolated value at the specified point.
LinearInterpolator class. Used to interpolate between values in linearly spaced data.
Select interpolation bin.
Return zero outside of interpolation range.
Select position in bin and return linear interpolation.
double sample | ( | Rndm & | rndm | ) | const |
Sample a random number distributed as given by this LinearInterpolator.
For very small dy, assume flat area.
Otherwise use standard abc formula