| 
    queso-0.52.0
    
   | 
 
Class for random number generation (base class for either GSL or Boost RNG). More...
#include <RngBase.h>

Public Member Functions | |
Constructor/Destructor methods  | |
| RngBase () | |
| Default Constructor: it should not be used.  More... | |
| RngBase (int seed, int worldRank) | |
| Constructor with seed.  More... | |
| virtual | ~RngBase () | 
| Virtual destructor.  More... | |
Sampling methods  | |
| int | seed () const | 
| Sets the seed.  More... | |
| virtual void | resetSeed (int newSeed) | 
Resets the seed with value newSeed.  More... | |
| virtual double | uniformSample () const =0 | 
| Samples a value from a uniform distribution.  More... | |
| virtual double | gaussianSample (double stdDev) const =0 | 
Samples a value from a Gaussian distribution with standard deviation given by stdDev.  More... | |
| virtual double | betaSample (double alpha, double beta) const =0 | 
| Samples a value from a Beta distribution.  More... | |
| virtual double | gammaSample (double a, double b) const =0 | 
| Samples a value from a Gamma distribution.  More... | |
Protected Attributes | |
| int | m_seed | 
| Seed.  More... | |
| int | m_worldRank | 
| Rank of processor.  More... | |
Private Member Functions | |
| void | privateResetSeed () | 
| Reset seed.  More... | |
Class for random number generation (base class for either GSL or Boost RNG).
This class is a “virtual” class of generic random number generator, in order to accommodate either GSL or Boost RNG.
| QUESO::RngBase::RngBase | ( | ) | 
Default Constructor: it should not be used.
Definition at line 30 of file RngBase.C.
References m_worldRank, and UQ_FATAL_TEST_MACRO.
| QUESO::RngBase::RngBase | ( | int | seed, | 
| int | worldRank | ||
| ) | 
      
  | 
  virtual | 
      
  | 
  pure virtual | 
Samples a value from a Beta distribution.
Implemented in QUESO::RngGsl, and QUESO::RngBoost.
Referenced by QUESO::GslVector::cwSetBeta().
      
  | 
  pure virtual | 
Samples a value from a Gamma distribution.
Implemented in QUESO::RngGsl, and QUESO::RngBoost.
Referenced by QUESO::GslVector::cwSetGamma(), and QUESO::GslVector::cwSetInverseGamma().
      
  | 
  pure virtual | 
Samples a value from a Gaussian distribution with standard deviation given by stdDev. 
Implemented in QUESO::RngGsl, and QUESO::RngBoost.
Referenced by QUESO::GslVector::cwSetGaussian(), QUESO::InfiniteDimensionalGaussian::draw(), and QUESO::MiscGammar().
      
  | 
  private | 
Reset seed.
Definition at line 68 of file RngBase.C.
References m_seed, and m_worldRank.
Referenced by resetSeed(), and RngBase().
      
  | 
  virtual | 
Resets the seed with value newSeed. 
Reimplemented in QUESO::RngGsl, and QUESO::RngBoost.
Definition at line 60 of file RngBase.C.
References m_seed, and privateResetSeed().
Referenced by QUESO::RngGsl::resetSeed(), and QUESO::BaseEnvironment::resetSeed().
| int QUESO::RngBase::seed | ( | ) | const | 
Sets the seed.
Definition at line 54 of file RngBase.C.
References m_seed.
Referenced by QUESO::BaseEnvironment::seed().
      
  | 
  pure virtual | 
Samples a value from a uniform distribution.
Implemented in QUESO::RngGsl, and QUESO::RngBoost.
Referenced by QUESO::GslVector::cwSetUniform(), QUESO::MiscGammar(), and QUESO::FiniteDistribution::sample().
      
  | 
  protected | 
Seed.
Definition at line 85 of file RngBase.h.
Referenced by privateResetSeed(), resetSeed(), QUESO::RngGsl::resetSeed(), QUESO::RngGsl::RngGsl(), and seed().
      
  | 
  protected | 
Rank of processor.
Definition at line 88 of file RngBase.h.
Referenced by privateResetSeed(), QUESO::RngGsl::resetSeed(), RngBase(), QUESO::RngBoost::RngBoost(), and QUESO::RngGsl::RngGsl().