LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Class storing a seed in the valid range. More...
#include "RandomSeedPolicyBase.h"
Public Types | |
using | seed_t = SEED |
type of random seed More... | |
Public Member Functions | |
template<typename T > | |
ValidSeed (T s) | |
Constructor: converts from a value. More... | |
ValidSeed (const ValidSeed &)=delete | |
ValidSeed (ValidSeed &&)=default | |
ValidSeed & | operator= (const ValidSeed &)=delete |
ValidSeed & | operator= (ValidSeed &&)=default |
operator seed_t () const | |
Return the converted seeda. More... | |
Static Public Member Functions | |
template<typename T > | |
static constexpr seed_t | MakeValid (T s) |
Forces the specified value into the allowed seed range. More... | |
template<typename T > | |
static constexpr bool | isValid (T s) |
Returns whether the specified seed is valid. More... | |
Static Public Attributes | |
static constexpr seed_t | Min = 1 |
Smallest allowed seed. More... | |
static constexpr seed_t | Max = 900000000 |
Largest allowed seed. More... | |
Protected Attributes | |
seed_t | seed |
the converted seed More... | |
Static Private Member Functions | |
template<typename T > | |
static constexpr seed_t | BounceUp (T s, T min, T max) |
May be merged into MakeValid() with C++14. More... | |
Class storing a seed in the valid range.
Definition at line 45 of file RandomSeedPolicyBase.h.
using rndm::details::ValidSeed< SEED >::seed_t = SEED |
type of random seed
Definition at line 47 of file RandomSeedPolicyBase.h.
|
inline |
Constructor: converts from a value.
Definition at line 64 of file RandomSeedPolicyBase.h.
References rndm::details::ValidSeed< SEED >::operator=().
|
delete |
|
default |
|
inlinestaticprivate |
May be merged into MakeValid() with C++14.
Definition at line 80 of file RandomSeedPolicyBase.h.
Referenced by rndm::details::ValidSeed< SEED >::MakeValid().
|
inlinestatic |
Returns whether the specified seed is valid.
Definition at line 59 of file RandomSeedPolicyBase.h.
References rndm::details::ValidSeed< SEED >::Max.
|
inlinestatic |
Forces the specified value into the allowed seed range.
Definition at line 54 of file RandomSeedPolicyBase.h.
References rndm::details::ValidSeed< SEED >::BounceUp().
|
inline |
Return the converted seeda.
Definition at line 72 of file RandomSeedPolicyBase.h.
References rndm::details::ValidSeed< SEED >::seed.
|
delete |
Referenced by rndm::details::ValidSeed< SEED >::ValidSeed().
|
default |
|
static |
Largest allowed seed.
Definition at line 50 of file RandomSeedPolicyBase.h.
Referenced by rndm::details::ValidSeed< SEED >::isValid().
|
static |
Smallest allowed seed.
Definition at line 49 of file RandomSeedPolicyBase.h.
|
protected |
the converted seed
Definition at line 75 of file RandomSeedPolicyBase.h.
Referenced by rndm::details::CheckedRangePolicy< SEED >::getSeed(), rndm::details::ValidSeed< SEED >::operator seed_t(), and rndm::details::RangeCheckHelper< seed_t >::operator()().