Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | List of all members
mygsl::base_sampling Class Referenceabstract

Base class for all sampling models. More...

#include <bayeux/mygsl/base_sampling.h>

Inheritance diagram for mygsl::base_sampling:
mygsl::linear_sampling mygsl::tabulated_sampling

Public Member Functions

 base_sampling ()
 Default constructor. More...
 
virtual ~base_sampling ()
 Destructor. More...
 
virtual double get_min () const =0
 Return the minimum sample. More...
 
virtual double get_max () const =0
 Return the maximum sample. More...
 
virtual std::size_t get_nsteps () const =0
 Return the number of steps. More...
 
virtual std::size_t get_nsamples () const =0
 Return the number of samples. More...
 
virtual bool is_initialized () const =0
 Check the initialization status of the sampling. More...
 
virtual void initialize (const datatools::properties &)=0
 Initialize from a set of properties. More...
 
virtual void reset ()=0
 Reset/invalidate the sampling. More...
 
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. More...
 
bool value_to_index (const double x_, std::size_t &left_sample_index_) const
 Return the left sample index associated to a value. More...
 
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. More...
 
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. More...
 
std::size_t get_first_index () const
 Return the first sample index. More...
 
std::size_t get_last_index () const
 Return the last sample index. More...
 
std::size_t get_first_step_index () const
 Return the first step index. More...
 
std::size_t get_last_step_index () const
 Return the last step index. More...
 
bool index_is_valid (const std::size_t sample_index_) const
 Check if a sample index is valid. More...
 
bool value_is_valid (const double value_) const
 Check if a value is in the sampling domain. More...
 
bool compute_step_bounds (const std::size_t step_index_, double &min_, double &max_) const
 Compute the bounds of step with given index. More...
 

Detailed Description

Base class for all sampling models.

Constructor & Destructor Documentation

◆ base_sampling()

mygsl::base_sampling::base_sampling ( )

Default constructor.

◆ ~base_sampling()

virtual mygsl::base_sampling::~base_sampling ( )
virtual

Destructor.

Member Function Documentation

◆ compute_step_bounds()

bool mygsl::base_sampling::compute_step_bounds ( const std::size_t  step_index_,
double &  min_,
double &  max_ 
) const

Compute the bounds of step with given index.

◆ get_first_index()

std::size_t mygsl::base_sampling::get_first_index ( ) const

Return the first sample index.

◆ get_first_step_index()

std::size_t mygsl::base_sampling::get_first_step_index ( ) const

Return the first step index.

◆ get_last_index()

std::size_t mygsl::base_sampling::get_last_index ( ) const

Return the last sample index.

◆ get_last_step_index()

std::size_t mygsl::base_sampling::get_last_step_index ( ) const

Return the last step index.

◆ get_max()

virtual double mygsl::base_sampling::get_max ( ) const
pure virtual

Return the maximum sample.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ get_min()

virtual double mygsl::base_sampling::get_min ( ) const
pure virtual

Return the minimum sample.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ get_nsamples()

virtual std::size_t mygsl::base_sampling::get_nsamples ( ) const
pure virtual

Return the number of samples.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ get_nsteps()

virtual std::size_t mygsl::base_sampling::get_nsteps ( ) const
pure virtual

Return the number of steps.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ has_index()

virtual bool mygsl::base_sampling::has_index ( const double  value_,
const std::size_t  sample_index_ 
) const
virtual

Check if the checked value is associated to the given sample index.

◆ index_is_valid()

bool mygsl::base_sampling::index_is_valid ( const std::size_t  sample_index_) const

Check if a sample index is valid.

◆ index_to_value()

virtual sampling::index_classification_type mygsl::base_sampling::index_to_value ( const std::size_t  sample_index_,
double &  value_ 
) const
pure virtual

Return the value associated to a given sample index.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ initialize()

virtual void mygsl::base_sampling::initialize ( const datatools::properties )
pure virtual

Initialize from a set of properties.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ is_initialized()

virtual bool mygsl::base_sampling::is_initialized ( ) const
pure virtual

Check the initialization status of the sampling.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ reset()

virtual void mygsl::base_sampling::reset ( )
pure virtual

Reset/invalidate the sampling.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ value_is_valid()

bool mygsl::base_sampling::value_is_valid ( const double  value_) const

Check if a value is in the sampling domain.

◆ value_to_index() [1/2]

virtual bool mygsl::base_sampling::value_to_index ( const double  x_,
std::size_t &  left_sample_index_,
sampling::index_classification_type classification_ 
) const
pure virtual

Return the left sample index and a classification associated to a value.

Implemented in mygsl::tabulated_sampling, and mygsl::linear_sampling.

◆ value_to_index() [2/2]

bool mygsl::base_sampling::value_to_index ( const double  x_,
std::size_t &  left_sample_index_ 
) const

Return the left sample index associated to a value.


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