Normal distribution focussing on speed.
More...
#include <RandFastGauss.h>
|
| RandFastGauss (CLHEP::HepRandomEngine &anEngine, double mean=0.0, double stdDev=1.0) |
| Constructor: borrows an engine but does not manage it. More...
|
|
| RandFastGauss (CLHEP::HepRandomEngine *anEngine, double mean=0.0, double stdDev=1.0) |
| Constructor: takes ownership of the engine. More...
|
|
double | fire () |
| Extracts a single normal value under the default distribution. More...
|
|
double | fire (double mean, double stdDev) |
| Extracts a single normal value under the specified normal distribution. More...
|
|
void | fireArray (const int size, double *vect) |
|
void | fireArray (const int size, double *vect, double mean, double stdDev) |
|
virtual double | operator() () override |
| Extracts a single normal value under the default distribution. More...
|
|
double | operator() (double mean, double stdDev) |
| Extracts a single normal value under the specified normal distribution. More...
|
|
virtual std::string | name () const override |
| Returns the name of the distribution. More...
|
|
virtual CLHEP::HepRandomEngine & | engine () override |
| Returns the default random generator engine. More...
|
|
virtual std::ostream & | put (std::ostream &os) const override |
|
virtual std::istream & | get (std::istream &is) override |
|
|
static double | shoot () |
|
static double | shoot (double mean, double stdDev) |
|
static void | shootArray (const int size, double *vect, double mean=0.0, double stdDev=1.0) |
|
static double | shoot (CLHEP::HepRandomEngine *anEngine) |
|
static double | shoot (CLHEP::HepRandomEngine *anEngine, double mean, double stdDev) |
|
static void | shootArray (CLHEP::HepRandomEngine *anEngine, const int size, double *vect, double mean=0.0, double stdDev=1.0) |
|
static std::string | distributionName () |
| Returns the name of the distribution. More...
|
|
static void | saveEngineStatus (const char filename[]="Config.conf") |
|
static void | restoreEngineStatus (const char filename[]="Config.conf") |
|
static std::ostream & | saveFullState (std::ostream &os) |
|
static std::istream & | restoreFullState (std::istream &is) |
|
static std::ostream & | saveDistState (std::ostream &os) |
|
static std::istream & | restoreDistState (std::istream &is) |
|
Normal distribution focussing on speed.
The random number is generated via util::FastAndPoorGauss<double>
.
- Note
- This class is incomplete.
Definition at line 32 of file RandFastGauss.h.
util::RandFastGauss::RandFastGauss |
( |
CLHEP::HepRandomEngine & |
anEngine, |
|
|
double |
mean = 0.0 , |
|
|
double |
stdDev = 1.0 |
|
) |
| |
Constructor: borrows an engine but does not manage it.
Definition at line 148 of file RandFastGauss.h.
util::GaussianTransformer< double > fTransform
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
std::shared_ptr< CLHEP::HepRandomEngine > localEngine
util::RandFastGauss::RandFastGauss |
( |
CLHEP::HepRandomEngine * |
anEngine, |
|
|
double |
mean = 0.0 , |
|
|
double |
stdDev = 1.0 |
|
) |
| |
Constructor: takes ownership of the engine.
The ownership of the specified engine is transferred to this object, which will dispose of it at the end of its life.
static std::string util::RandFastGauss::distributionName |
( |
| ) |
|
|
inlinestatic |
Returns the name of the distribution.
Definition at line 95 of file RandFastGauss.h.
95 {
return "RandFastGauss"; }
virtual CLHEP::HepRandomEngine& util::RandFastGauss::engine |
( |
| ) |
|
|
inlineoverridevirtual |
Returns the default random generator engine.
Definition at line 92 of file RandFastGauss.h.
std::shared_ptr< CLHEP::HepRandomEngine > localEngine
double util::RandFastGauss::fire |
( |
| ) |
|
|
inline |
Extracts a single normal value under the default distribution.
Definition at line 72 of file RandFastGauss.h.
util::GaussianTransformer< double > fTransform
double util::RandFastGauss::fire |
( |
double |
mean, |
|
|
double |
stdDev |
|
) |
| |
|
inline |
Extracts a single normal value under the specified normal distribution.
Definition at line 75 of file RandFastGauss.h.
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
void util::RandFastGauss::fireArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
void util::RandFastGauss::fireArray |
( |
const int |
size, |
|
|
double * |
vect, |
|
|
double |
mean, |
|
|
double |
stdDev |
|
) |
| |
virtual std::istream& util::RandFastGauss::get |
( |
std::istream & |
is | ) |
|
|
inlineoverridevirtual |
virtual std::string util::RandFastGauss::name |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the name of the distribution.
Definition at line 89 of file RandFastGauss.h.
static std::string distributionName()
Returns the name of the distribution.
double util::RandFastGauss::normal |
( |
| ) |
|
|
inlineprotected |
Definition at line 134 of file RandFastGauss.h.
util::FastAndPoorGauss< 32768U > fToGauss
Translates uniform number in [ 0, 1 ] into a Gaussian number.
std::shared_ptr< CLHEP::HepRandomEngine > localEngine
virtual double util::RandFastGauss::operator() |
( |
| ) |
|
|
inlineoverridevirtual |
Extracts a single normal value under the default distribution.
Definition at line 83 of file RandFastGauss.h.
double fire()
Extracts a single normal value under the default distribution.
double util::RandFastGauss::operator() |
( |
double |
mean, |
|
|
double |
stdDev |
|
) |
| |
|
inline |
Extracts a single normal value under the specified normal distribution.
Definition at line 86 of file RandFastGauss.h.
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
double fire()
Extracts a single normal value under the default distribution.
virtual std::ostream& util::RandFastGauss::put |
( |
std::ostream & |
os | ) |
const |
|
inlineoverridevirtual |
static std::istream& util::RandFastGauss::restoreDistState |
( |
std::istream & |
is | ) |
|
|
static |
static void util::RandFastGauss::restoreEngineStatus |
( |
const char |
filename[] = "Config.conf" | ) |
|
|
static |
static std::istream& util::RandFastGauss::restoreFullState |
( |
std::istream & |
is | ) |
|
|
static |
static std::ostream& util::RandFastGauss::saveDistState |
( |
std::ostream & |
os | ) |
|
|
static |
static void util::RandFastGauss::saveEngineStatus |
( |
const char |
filename[] = "Config.conf" | ) |
|
|
static |
static std::ostream& util::RandFastGauss::saveFullState |
( |
std::ostream & |
os | ) |
|
|
static |
static double util::RandFastGauss::shoot |
( |
| ) |
|
|
static |
static double util::RandFastGauss::shoot |
( |
double |
mean, |
|
|
double |
stdDev |
|
) |
| |
|
static |
static double util::RandFastGauss::shoot |
( |
CLHEP::HepRandomEngine * |
anEngine | ) |
|
|
static |
static double util::RandFastGauss::shoot |
( |
CLHEP::HepRandomEngine * |
anEngine, |
|
|
double |
mean, |
|
|
double |
stdDev |
|
) |
| |
|
static |
static void util::RandFastGauss::shootArray |
( |
const int |
size, |
|
|
double * |
vect, |
|
|
double |
mean = 0.0 , |
|
|
double |
stdDev = 1.0 |
|
) |
| |
|
static |
static void util::RandFastGauss::shootArray |
( |
CLHEP::HepRandomEngine * |
anEngine, |
|
|
const int |
size, |
|
|
double * |
vect, |
|
|
double |
mean = 0.0 , |
|
|
double |
stdDev = 1.0 |
|
) |
| |
|
static |
Translates uniform number in [ 0, 1 ] into a Gaussian number.
Definition at line 139 of file RandFastGauss.h.
std::shared_ptr<CLHEP::HepRandomEngine> util::RandFastGauss::localEngine |
|
protected |
The documentation for this class was generated from the following file: