PYTHIA  8.312
Public Member Functions | List of all members
LinearInterpolator Class Reference

#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...
 

Detailed Description

LinearInterpolator class. Used to interpolate between values in linearly spaced data. The interpolation uses the arithmetic mean.

Member Function Documentation

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


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