| 
    Bridge++
    Version 1.4.4
    
   | 
 
Manager class for RandomNumbers. More...
#include <randomNumberManager.h>
Public Member Functions | |
| RandomNumberManager () | |
| virtual | ~RandomNumberManager () | 
| void | set_parameter_verboselevel (const Bridge::VerboseLevel vl) | 
Static Public Member Functions | |
| static RandomNumbers * | getInstance () | 
| static bool | initialize (const std::string &rng_type, unsigned long seed) | 
| static void | finalize () | 
| static void | reset (unsigned long seed) | 
| static void | restore_state (const std::string &filename) | 
| static void | save_state (const std::string &filename) | 
| static RandomNumbers * | New (const std::string &rng_type, unsigned long seed) | 
Static Public Attributes | |
| static const std::string | class_name = "RandomNumberManager" | 
Protected Attributes | |
| Bridge::VerboseLevel | m_vl | 
Private Member Functions | |
| RandomNumberManager (const RandomNumberManager &) | |
| RandomNumberManager & | operator= (const RandomNumberManager &) | 
Static Private Member Functions | |
| static RandomNumbers * | factory (const std::string &rng_type, unsigned long seed) | 
Static Private Attributes | |
| static RandomNumbers * | s_rand = NULL | 
Manager class for RandomNumbers.
This class manages a global instance of RandomNumbers class. [7 July 2016 T.Aoyama]
Usage:
RandomNumberManager::initialize(rng_type, seed); – initialize global RNG by creating an instance of rng_type with the specified seed.
RandomNumbers* rand = RandomNumberManager::getInstance(); – fetch the global RNG. the program terminates unless initialized.
RandomNumberManager::reset(seed); – reset the state of the global RNG.
RandomNumberManager::save_state(filename); RandomNumberManager::restore_state(filename); – save/restore the state of the global RNG to/from the file.
RandomNumberManager::finalize(); – finalize the global RNG by releasing the instance.
RandomNumbers* rand = RandomNumberManager::New(rng_type, seed); – factory for RandomNumbers class. an instance of rng_type is new'ed and returned.
Definition at line 53 of file randomNumberManager.h.
      
  | 
  inline | 
Definition at line 63 of file randomNumberManager.h.
      
  | 
  inlinevirtual | 
Definition at line 66 of file randomNumberManager.h.
      
  | 
  private | 
      
  | 
  staticprivate | 
Definition at line 26 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 80 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 45 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 57 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 129 of file randomNumberManager.cpp.
      
  | 
  private | 
      
  | 
  static | 
Definition at line 90 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 103 of file randomNumberManager.cpp.
      
  | 
  static | 
Definition at line 116 of file randomNumberManager.cpp.
      
  | 
  inline | 
Definition at line 88 of file randomNumberManager.h.
      
  | 
  static | 
Definition at line 56 of file randomNumberManager.h.
      
  | 
  protected | 
Definition at line 59 of file randomNumberManager.h.
      
  | 
  staticprivate | 
Definition at line 91 of file randomNumberManager.h.