20 #ifndef __stir_numerics_FastErf__H__ 21 # define __stir_numerics_FastErf__H__ 40 double _sampling_period;
46 BSpline::BSplines1DRegularGrid<double, double> _spline;
51 double _maximum_sample_value;
54 std::vector<double> erf_values_vec;
57 explicit FastErf(
const int num_samples = 1000,
const float maximum_sample_value = 5)
58 : _num_samples(num_samples),
59 _maximum_sample_value(maximum_sample_value)
63 inline int get_num_samples()
const;
65 inline void set_num_samples(
int num_samples);
68 inline double get_maximum_sample_value()
const;
70 inline void set_maximum_sample_value(
double maximum_sample_value);
80 inline double get_erf_BSplines_interpolation(
double xp)
const;
86 inline double get_erf_linear_interpolation(
double xp)
const;
92 inline double get_erf_nearest_neighbour_interpolation(
double xp)
const;
95 inline const double operator()(
const double xp)
const;
102 #endif // __stir_numerics_FastErf__H__ Implementation of an erf interpolation.
Implementation of the B-Splines Interpolation.