21 #ifndef MYGSL_BASE_SAMPLING_H 22 #define MYGSL_BASE_SAMPLING_H 45 virtual double get_min()
const = 0;
48 virtual double get_max()
const = 0;
63 virtual void reset() = 0;
67 std::size_t & left_sample_index_,
71 bool value_to_index(
const double x_, std::size_t & left_sample_index_)
const;
75 index_to_value(
const std::size_t sample_index_,
double & value_)
const = 0;
78 virtual bool has_index(
const double value_,
const std::size_t sample_index_)
const;
99 bool compute_step_bounds(
const std::size_t step_index_,
double & min_,
double & max_)
const;
105 #endif // MYGSL_BASE_SAMPLING_H virtual sampling::index_classification_type index_to_value(const std::size_t sample_index_, double &value_) const =0
Return the value associated to a given sample index.
virtual double get_max() const =0
Return the maximum sample.
std::size_t get_first_step_index() const
Return the first step index.
virtual bool has_index(const double value_, const std::size_t sample_index_) const
Check if the checked value is associated to the given sample index.
bool index_is_valid(const std::size_t sample_index_) const
Check if a sample index is valid.
Base class for all sampling models.
Definition: base_sampling.h:34
bool compute_step_bounds(const std::size_t step_index_, double &min_, double &max_) const
Compute the bounds of step with given index.
virtual bool is_initialized() const =0
Check the initialization status of the sampling.
virtual bool value_to_index(const double x_, std::size_t &left_sample_index_, sampling::index_classification_type &classification_) const =0
Return the left sample index and a classification associated to a value.
std::size_t get_last_step_index() const
Return the last step index.
index_classification_type
Definition: sampling_utils.h:53
virtual void reset()=0
Reset/invalidate the sampling.
std::size_t get_first_index() const
Return the first sample index.
virtual ~base_sampling()
Destructor.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
std::size_t get_last_index() const
Return the last sample index.
base_sampling()
Default constructor.
bool value_is_valid(const double value_) const
Check if a value is in the sampling domain.
virtual std::size_t get_nsteps() const =0
Return the number of steps.
virtual double get_min() const =0
Return the minimum sample.
virtual void initialize(const datatools::properties &)=0
Initialize from a set of properties.
virtual std::size_t get_nsamples() const =0
Return the number of samples.