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

Linear sampling model. More...

#include <bayeux/mygsl/linear_sampling.h>

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

Public Member Functions

 linear_sampling ()
 Default constructor. More...
 
virtual ~linear_sampling ()
 Destructor. More...
 
virtual double get_min () const
 Return the minimum sample. More...
 
virtual double get_max () const
 Return the maximum sample. More...
 
std::size_t get_nsteps () const
 Return the number of steps. More...
 
std::size_t get_nsamples () const
 Return the number of nsamples. More...
 
double get_step () const
 Return the step. More...
 
double get_guard () const
 Return the absolute guard distance around sampling values. More...
 
virtual bool is_initialized () const
 Check the initialization status of the sampling. More...
 
virtual void initialize (const datatools::properties &)
 Reset/invalidate the sampling. More...
 
virtual void reset ()
 Reset/invalidate the sampling. More...
 
virtual bool value_to_index (const double x_, std::size_t &index_, sampling::index_classification_type &classification_flags_) const
 Return the index and a classification associated to a value. More...
 
virtual sampling::index_classification_type index_to_value (const std::size_t index_, double &value_) const
 Return the value associated to a given index. More...
 
void make_range (const double min_, const double max_, const std::size_t nsteps_, const double guard_=0.0)
 
void make_from_min (const double min_, const std::size_t nsteps_, const double step_, const double guard_=0.0)
 
void make_to_max (const double max_, const std::size_t nsteps_, const double step_, const double guard_=0.0)
 
- Public Member Functions inherited from mygsl::base_sampling
 base_sampling ()
 Default constructor. More...
 
virtual ~base_sampling ()
 Destructor. 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 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

Linear sampling model.

Constructor & Destructor Documentation

◆ linear_sampling()

mygsl::linear_sampling::linear_sampling ( )

Default constructor.

◆ ~linear_sampling()

virtual mygsl::linear_sampling::~linear_sampling ( )
virtual

Destructor.

Member Function Documentation

◆ get_guard()

double mygsl::linear_sampling::get_guard ( ) const

Return the absolute guard distance around sampling values.

◆ get_max()

virtual double mygsl::linear_sampling::get_max ( ) const
virtual

Return the maximum sample.

Implements mygsl::base_sampling.

◆ get_min()

virtual double mygsl::linear_sampling::get_min ( ) const
virtual

Return the minimum sample.

Implements mygsl::base_sampling.

◆ get_nsamples()

std::size_t mygsl::linear_sampling::get_nsamples ( ) const
virtual

Return the number of nsamples.

Implements mygsl::base_sampling.

◆ get_nsteps()

std::size_t mygsl::linear_sampling::get_nsteps ( ) const
virtual

Return the number of steps.

Implements mygsl::base_sampling.

◆ get_step()

double mygsl::linear_sampling::get_step ( ) const

Return the step.

◆ index_to_value()

virtual sampling::index_classification_type mygsl::linear_sampling::index_to_value ( const std::size_t  index_,
double &  value_ 
) const
virtual

Return the value associated to a given index.

Implements mygsl::base_sampling.

◆ initialize()

virtual void mygsl::linear_sampling::initialize ( const datatools::properties )
virtual

Reset/invalidate the sampling.

Implements mygsl::base_sampling.

◆ is_initialized()

virtual bool mygsl::linear_sampling::is_initialized ( ) const
virtual

Check the initialization status of the sampling.

Implements mygsl::base_sampling.

◆ make_from_min()

void mygsl::linear_sampling::make_from_min ( const double  min_,
const std::size_t  nsteps_,
const double  step_,
const double  guard_ = 0.0 
)

Build sampling from given min up to max with given number of steps and given step size

step
+----->----->-----> . . . ------>----->
: 0 1 2 nsteps-1
---------------+-----+-----+-----+ - - - +-----+-----+---------> x
min nsteps-2 [max]

◆ make_range()

void mygsl::linear_sampling::make_range ( const double  min_,
const double  max_,
const std::size_t  nsteps_,
const double  guard_ = 0.0 
)

Build sampling from min to max and given number of steps

0 1 2 nsteps-1
---------------+-----+-----+-----+ - - - +-----+-----+---------> x
min <-----> nsteps-2 max
[step]

◆ make_to_max()

void mygsl::linear_sampling::make_to_max ( const double  max_,
const std::size_t  nsteps_,
const double  step_,
const double  guard_ = 0.0 
)

Build sampling from given max down to min with given number of steps and given step size

step
<-----<-----<------ . . . <-----<-----+
0 1 2 :
---------------+-----+-----+-----+ - - - +-----+-----+---------> x
[min] nsteps-1
max

◆ reset()

virtual void mygsl::linear_sampling::reset ( )
virtual

Reset/invalidate the sampling.

Implements mygsl::base_sampling.

◆ value_to_index()

virtual bool mygsl::linear_sampling::value_to_index ( const double  x_,
std::size_t &  index_,
sampling::index_classification_type classification_flags_ 
) const
virtual

Return the index and a classification associated to a value.

Implements mygsl::base_sampling.


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