Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
randomNumberManager.h
Go to the documentation of this file.
1 
14 #ifndef RANDOMNUMBER_MANAGER_INCLUDED
15 #define RANDOMNUMBER_MANAGER_INCLUDED
16 
17 #include "randomNumbers.h"
18 
19 #include "IO/bridgeIO.h"
20 using Bridge::vout;
21 
23 
54 {
55  public:
56  static const std::string class_name;
57 
58  protected:
60 
61  public:
62 
64  : m_vl(CommonParameters::Vlevel()) {}
65 
66  virtual ~RandomNumberManager() {}
67 
68  // class methods
69  static RandomNumbers *getInstance();
70 
71  static bool initialize(const std::string& rng_type, unsigned long seed);
72  static void finalize();
73 
74  static void reset(unsigned long seed);
75 
76  static void restore_state(const std::string& filename);
77  static void save_state(const std::string& filename);
78 
79  // factory
80  static RandomNumbers *New(const std::string& rng_type, unsigned long seed);
81 
82  private:
83  // non-copyable
86 
87  public:
89 
90  private:
92 
93  static RandomNumbers *factory(const std::string& rng_type, unsigned long seed);
94 };
95 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
RandomNumberManager & operator=(const RandomNumberManager &)
static RandomNumbers * getInstance()
static const std::string class_name
static void save_state(const std::string &filename)
Bridge::VerboseLevel m_vl
static bool initialize(const std::string &rng_type, unsigned long seed)
static RandomNumbers * factory(const std::string &rng_type, unsigned long seed)
static void restore_state(const std::string &filename)
Common parameter class: provides parameters as singleton.
static RandomNumbers * s_rand
static void reset(unsigned long seed)
Manager class for RandomNumbers.
Base class of random number generators.
Definition: randomNumbers.h:43
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
static RandomNumbers * New(const std::string &rng_type, unsigned long seed)
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)