A class, providing ROOT-free access to randomly generated variables.
More...
#include <CaAlgoRandom.h>
|
| | Random () |
| | Default constructor.
|
| |
| | Random (int seed) |
| | Constructor.
|
| |
| | Random (const Random &other)=delete |
| | Copy constructor.
|
| |
| | Random (Random &&other)=delete |
| | Move constructor.
|
| |
| | ~Random ()=default |
| | Destructor.
|
| |
| Random & | operator= (const Random &)=delete |
| | Copy assignment operator.
|
| |
| Random & | operator= (Random &&)=delete |
| | Move assignment operator.
|
| |
| int | GetSeed () const |
| | Gets seed of the random generator.
|
| |
| void | SetSeed (int seed) |
| | Sets seed to the random generator.
|
| |
| template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool > = true> |
| T | BoundedGaus (const T &mean, const T &sigma, const T &nSigmas) const |
| | Returns a normally distributed random value, limited within a selected sigma range.
|
| |
| template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool > = true> |
| T | Uniform (const T &mean, const T &sigma) const |
| | Returns a random value, addressed with a continuous uniform distribution.
|
| |
A class, providing ROOT-free access to randomly generated variables.
Definition at line 22 of file CaAlgoRandom.h.
◆ GeneratorType_t
◆ Random() [1/4]
◆ Random() [2/4]
| Random::Random |
( |
int | seed | ) |
|
Constructor.
- Parameters
-
If 0 is selected for the random seed, the generator is seeded with std::random_device
Definition at line 21 of file CaAlgoRandom.cxx.
◆ Random() [3/4]
| cbm::algo::ca::Random::Random |
( |
const Random & | other | ) |
|
|
delete |
◆ Random() [4/4]
| cbm::algo::ca::Random::Random |
( |
Random && | other | ) |
|
|
delete |
◆ ~Random()
| cbm::algo::ca::Random::~Random |
( |
| ) |
|
|
default |
◆ BoundedGaus()
template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool >>
| T cbm::algo::ca::Random::BoundedGaus |
( |
const T & | mean, |
|
|
const T & | sigma, |
|
|
const T & | nSigmas ) const |
Returns a normally distributed random value, limited within a selected sigma range.
- Template Parameters
-
| T | Type of floating point numbers |
- Parameters
-
| mean | Mean of the distribution |
| sigma | Sigma of the distribution |
| nSigmas | Half-width of the generated numbers domain, expressed in number of sigmas |
Definition at line 90 of file CaAlgoRandom.h.
◆ GetSeed()
| int cbm::algo::ca::Random::GetSeed |
( |
| ) |
const |
|
inline |
Gets seed of the random generator.
Definition at line 53 of file CaAlgoRandom.h.
◆ operator=() [1/2]
| Random & cbm::algo::ca::Random::operator= |
( |
const Random & | | ) |
|
|
delete |
Copy assignment operator.
◆ operator=() [2/2]
Move assignment operator.
◆ SetSeed()
| void Random::SetSeed |
( |
int | seed | ) |
|
Sets seed to the random generator.
- Parameters
-
If 0 is selected for the random seed, the generator is seeded with std::random_device
Definition at line 25 of file CaAlgoRandom.cxx.
◆ Uniform()
template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool >>
| T cbm::algo::ca::Random::Uniform |
( |
const T & | mean, |
|
|
const T & | sigma ) const |
Returns a random value, addressed with a continuous uniform distribution.
- Template Parameters
-
| T | Type of floating point numbers |
- Parameters
-
| mean | Mean of the distribution |
| sigma | Sigma of the distribution |
Definition at line 106 of file CaAlgoRandom.h.
◆ fGenerator
◆ fSeed
| unsigned int cbm::algo::ca::Random::fSeed = 1 |
|
private |
The documentation for this class was generated from the following files: