A manager that can store the internal states associated to a set of PRNGs addressed with some labels.
More...
#include <bayeux/mygsl/prng_state_manager.h>
|
class | record |
| Internal record that store the internal state of a PRNG. More...
|
|
|
typedef std::map< std::string, record > | dict_type |
| An alias for the embedded dictionary container class. More...
|
|
A manager that can store the internal states associated to a set of PRNGs addressed with some labels.
◆ dict_type
An alias for the embedded dictionary container class.
◆ prng_state_manager() [1/2]
mygsl::prng_state_manager::prng_state_manager |
( |
| ) |
|
◆ prng_state_manager() [2/2]
mygsl::prng_state_manager::prng_state_manager |
( |
const std::string & |
| ) |
|
Constructor with a filename.
◆ ~prng_state_manager()
virtual mygsl::prng_state_manager::~prng_state_manager |
( |
| ) |
|
|
virtual |
◆ add_state()
void mygsl::prng_state_manager::add_state |
( |
const std::string & |
label_, |
|
|
size_t |
sz_ |
|
) |
| |
Add storage for the internal state of given size for a PRNG with a given label.
◆ clear()
void mygsl::prng_state_manager::clear |
( |
| ) |
|
Clear the content of the manager.
◆ default_filename()
const std::string& mygsl::prng_state_manager::default_filename |
( |
| ) |
|
◆ dump()
void mygsl::prng_state_manager::dump |
( |
std::ostream & |
out_ = std::clog | ) |
const |
◆ empty()
bool mygsl::prng_state_manager::empty |
( |
| ) |
const |
Check if the manager has no stored internal state records.
◆ error()
bool mygsl::prng_state_manager::error |
( |
| ) |
const |
◆ get_counter()
int mygsl::prng_state_manager::get_counter |
( |
| ) |
const |
Get the manager's running counter value.
◆ get_filename()
const std::string& mygsl::prng_state_manager::get_filename |
( |
| ) |
const |
Get the backup filename associated to the manager.
◆ get_labels()
void mygsl::prng_state_manager::get_labels |
( |
std::vector< std::string > & |
labels_ | ) |
const |
Build an array with all PRNGs' labels stored in the manager.
◆ get_state() [1/2]
const record& mygsl::prng_state_manager::get_state |
( |
const std::string & |
label_ | ) |
const |
Get a record that hosts the internal state of a PRNG with a given label (non mutable)
◆ get_state() [2/2]
record& mygsl::prng_state_manager::get_state |
( |
const std::string & |
label_ | ) |
|
Get a record that hosts the internal state of a PRNG with a given label (mutable)
◆ has_counter()
bool mygsl::prng_state_manager::has_counter |
( |
| ) |
const |
Check if the manager has a running counter value.
◆ has_filename()
bool mygsl::prng_state_manager::has_filename |
( |
| ) |
const |
Check if a backup filename is associated to the manager.
◆ has_state()
bool mygsl::prng_state_manager::has_state |
( |
const std::string & |
label_ | ) |
const |
Check if the manager stores the internal state of a PRNG with a given label.
◆ increment_counter()
void mygsl::prng_state_manager::increment_counter |
( |
unsigned int |
a_increment = 1 | ) |
|
Increment the manager's running counter value by a given value.
◆ invalidate()
void mygsl::prng_state_manager::invalidate |
( |
| ) |
|
◆ load()
void mygsl::prng_state_manager::load |
( |
const std::string & |
filename_ = "" | ) |
|
Load the content of the manager from a file with given filename.
◆ reset()
void mygsl::prng_state_manager::reset |
( |
| ) |
|
◆ reset_counter()
void mygsl::prng_state_manager::reset_counter |
( |
| ) |
|
Reset the manager's running counter value.
◆ reset_error()
void mygsl::prng_state_manager::reset_error |
( |
| ) |
|
◆ reset_filename()
void mygsl::prng_state_manager::reset_filename |
( |
| ) |
|
Reset the backup filename associated to the manager.
◆ set_counter()
void mygsl::prng_state_manager::set_counter |
( |
int |
| ) |
|
Set the manager's running counter value.
◆ set_filename()
void mygsl::prng_state_manager::set_filename |
( |
const std::string & |
= "" | ) |
|
Set the backup filename associated to the manager.
◆ size()
size_t mygsl::prng_state_manager::size |
( |
| ) |
const |
Return the number of internal state records.
◆ store()
void mygsl::prng_state_manager::store |
( |
const std::string & |
filename_ = "" | ) |
const |
Store the content of the manager in a file with given filename.
◆ INVALID_COUNTER_VALUE
const int mygsl::prng_state_manager::INVALID_COUNTER_VALUE = -1 |
|
static |
Constant that represents an invalid value for a counter.
The documentation for this class was generated from the following file: