|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Approximates a 1D function using linear interpolation on a grid of regularly-spaced points. More...
#include <LinearInterpolatingFunction.hh>
Public Member Functions | |
| LinearInterpolatingFunction (const std::function< double(double) > &func, double x_min, double x_max, size_t N=DEFAULT_N_LINEAR) | |
| double | evaluate (double x) const override |
| Returns an approximate value of the represented function. | |
| int | N () const |
Public Member Functions inherited from marley::InterpolatingFunction | |
| InterpolatingFunction (double x_min, double x_max) | |
Protected Attributes | |
| std::shared_ptr< InterpolationGrid< double, double > > | interp_grid_ |
Protected Attributes inherited from marley::InterpolatingFunction | |
| double | x_max_ |
| Upper bound of the interpolation range. | |
| double | x_min_ |
| Lower bound of the interpolation range. | |
Additional Inherited Members | |
Protected Member Functions inherited from marley::InterpolatingFunction | |
| InterpolatingFunction () | |
| Allows construction by derived classes without immediately defining the bounds of the interpolation range. | |
Approximates a 1D function using linear interpolation on a grid of regularly-spaced points.
Definition at line 31 of file LinearInterpolatingFunction.hh.
| marley::LinearInterpolatingFunction::LinearInterpolatingFunction | ( | const std::function< double(double) > & | func, |
| double | x_min, | ||
| double | x_max, | ||
| size_t | N = DEFAULT_N_LINEAR ) |
Definition at line 26 of file LinearInterpolatingFunction.cc.
|
inlineoverridevirtual |
Returns an approximate value of the represented function.
Implements marley::InterpolatingFunction.
Definition at line 38 of file LinearInterpolatingFunction.hh.
Referenced by marley::CachedOpticalModel::transmission_coefficient().
|
inline |
Definition at line 42 of file LinearInterpolatingFunction.hh.
|
protected |
Definition at line 46 of file LinearInterpolatingFunction.hh.