#include <RandStudentT.h>
- Author
Definition at line 41 of file RandStudentT.h.
◆ RandStudentT() [1/2]
CLHEP::RandStudentT::RandStudentT |
( |
HepRandomEngine & |
anEngine, |
|
|
double |
a = 1.0 |
|
) |
| |
|
inline |
◆ RandStudentT() [2/2]
CLHEP::RandStudentT::RandStudentT |
( |
HepRandomEngine * |
anEngine, |
|
|
double |
a = 1.0 |
|
) |
| |
|
inline |
◆ ~RandStudentT()
CLHEP::RandStudentT::~RandStudentT |
( |
| ) |
|
|
virtual |
◆ createInstance()
int CLHEP::HepRandom::createInstance |
( |
| ) |
|
|
staticinherited |
◆ distributionName()
static std::string CLHEP::RandStudentT::distributionName |
( |
| ) |
|
|
inlinestatic |
◆ engine()
◆ fire() [1/2]
double CLHEP::RandStudentT::fire |
( |
| ) |
|
|
inline |
◆ fire() [2/2]
double CLHEP::RandStudentT::fire |
( |
double |
a | ) |
|
Definition at line 101 of file RandStudentT.cc.
101 {
102
103 double u,v,w;
104
105 do
106 {
109 }
110 while ((w = u * u + v * v) > 1.0);
111
112 return(u * std::sqrt( a * ( std::exp(- 2.0 / a * std::log(w)) - 1.0) / w));
113}
References localEngine.
◆ fireArray() [1/2]
void CLHEP::RandStudentT::fireArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
◆ fireArray() [2/2]
void CLHEP::RandStudentT::fireArray |
( |
const int |
size, |
|
|
double * |
vect, |
|
|
double |
a |
|
) |
| |
Definition at line 121 of file RandStudentT.cc.
123{
124 for( double* v = vect; v != vect + size; ++v )
126}
References fire().
◆ flat() [1/2]
double CLHEP::HepRandom::flat |
( |
| ) |
|
|
inherited |
◆ flat() [2/2]
◆ flatArray() [1/2]
void CLHEP::HepRandom::flatArray |
( |
const int |
size, |
|
|
double * |
vect |
|
) |
| |
|
inherited |
◆ flatArray() [2/2]
void CLHEP::HepRandom::flatArray |
( |
HepRandomEngine * |
theNewEngine, |
|
|
const int |
size, |
|
|
double * |
vect |
|
) |
| |
|
inlineinherited |
◆ get()
std::istream & CLHEP::RandStudentT::get |
( |
std::istream & |
is | ) |
|
|
virtual |
Reimplemented from CLHEP::HepRandom.
Definition at line 153 of file RandStudentT.cc.
153 {
154 std::string inName;
155 is >> inName;
156 if (inName !=
name()) {
157 is.clear(std::ios::badbit | is.rdstate());
158 std::cerr << "Mismatch when expecting to read state of a "
159 <<
name() <<
" distribution\n"
160 << "Name found was " << inName
161 << "\nistream is left in the badbit state\n";
162 return is;
163 }
165 std::vector<unsigned long> t(2);
167 return is;
168 }
169
170 return is;
171}
static double longs2double(const std::vector< unsigned long > &v)
bool possibleKeywordInput(IS &is, const std::string &key, T &t)
References defaultA, CLHEP::DoubConv::longs2double(), name(), and CLHEP::possibleKeywordInput().
◆ getTheEngine()
Definition at line 268 of file Random.cc.
References CLHEP::anonymous_namespace{Random.cc}::theDefaults(), and CLHEP::anonymous_namespace{Random.cc}::defaults::theEngine.
Referenced by CLHEP::StaticRandomStates::restore(), CLHEP::RandFlat::restoreEngineStatus(), CLHEP::RandGauss::restoreEngineStatus(), CLHEP::RandFlat::saveEngineStatus(), CLHEP::RandGauss::saveEngineStatus(), CLHEP::RandExponential::shoot(), CLHEP::RandExpZiggurat::shoot(), CLHEP::RandFlat::shoot(), CLHEP::RandGauss::shoot(), CLHEP::RandGaussZiggurat::shoot(), CLHEP::RandChiSquare::shoot(), shoot(), CLHEP::RandBreitWigner::shoot(), CLHEP::RandGamma::shoot(), CLHEP::RandPoisson::shoot(), CLHEP::RandPoissonQ::shoot(), CLHEP::RandBinomial::shoot(), and CLHEP::RandFlat::shootArray().
◆ getTheGenerator()
HepRandom * CLHEP::HepRandom::getTheGenerator |
( |
| ) |
|
|
staticinherited |
◆ getTheSeed()
long CLHEP::HepRandom::getTheSeed |
( |
| ) |
|
|
staticinherited |
◆ getTheSeeds()
const long * CLHEP::HepRandom::getTheSeeds |
( |
| ) |
|
|
staticinherited |
◆ getTheTableSeeds()
void CLHEP::HepRandom::getTheTableSeeds |
( |
long * |
seeds, |
|
|
int |
index |
|
) |
| |
|
staticinherited |
◆ name()
std::string CLHEP::RandStudentT::name |
( |
| ) |
const |
|
virtual |
◆ operator()() [1/2]
double CLHEP::RandStudentT::operator() |
( |
| ) |
|
|
virtual |
◆ operator()() [2/2]
double CLHEP::RandStudentT::operator() |
( |
double |
a | ) |
|
◆ put()
std::ostream & CLHEP::RandStudentT::put |
( |
std::ostream & |
os | ) |
const |
|
virtual |
◆ restoreDistState()
static std::istream & CLHEP::HepRandom::restoreDistState |
( |
std::istream & |
is | ) |
|
|
inlinestaticinherited |
◆ restoreEngineStatus()
void CLHEP::HepRandom::restoreEngineStatus |
( |
const char |
filename[] = "Config.conf" | ) |
|
|
staticinherited |
◆ restoreFullState()
std::istream & CLHEP::HepRandom::restoreFullState |
( |
std::istream & |
is | ) |
|
|
staticinherited |
◆ restoreStaticRandomStates()
std::istream & CLHEP::HepRandom::restoreStaticRandomStates |
( |
std::istream & |
is | ) |
|
|
staticinherited |
◆ saveDistState()
static std::ostream & CLHEP::HepRandom::saveDistState |
( |
std::ostream & |
os | ) |
|
|
inlinestaticinherited |
◆ saveEngineStatus()
void CLHEP::HepRandom::saveEngineStatus |
( |
const char |
filename[] = "Config.conf" | ) |
|
|
staticinherited |
◆ saveFullState()
std::ostream & CLHEP::HepRandom::saveFullState |
( |
std::ostream & |
os | ) |
|
|
staticinherited |
◆ saveStaticRandomStates()
std::ostream & CLHEP::HepRandom::saveStaticRandomStates |
( |
std::ostream & |
os | ) |
|
|
staticinherited |
◆ setTheEngine()
◆ setTheSeed()
void CLHEP::HepRandom::setTheSeed |
( |
long |
seed, |
|
|
int |
lxr = 3 |
|
) |
| |
|
staticinherited |
◆ setTheSeeds()
void CLHEP::HepRandom::setTheSeeds |
( |
const long * |
seeds, |
|
|
int |
aux = -1 |
|
) |
| |
|
staticinherited |
◆ shoot() [1/4]
static double CLHEP::RandStudentT::shoot |
( |
| ) |
|
|
inlinestatic |
◆ shoot() [2/4]
double CLHEP::RandStudentT::shoot |
( |
double |
a | ) |
|
|
static |
◆ shoot() [3/4]
◆ shoot() [4/4]
Definition at line 128 of file RandStudentT.cc.
128 {
129
130 double u,v,w;
131
132 do
133 {
134 u = 2.0 * anEngine->flat() - 1.0;
135 v = 2.0 * anEngine->flat() - 1.0;
136 }
137 while ((w = u * u + v * v) > 1.0);
138
139 return(u * std::sqrt( a * ( std::exp(- 2.0 / a * std::log(w)) - 1.0) / w));
140}
References CLHEP::HepRandomEngine::flat().
◆ shootArray() [1/2]
void CLHEP::RandStudentT::shootArray |
( |
const int |
size, |
|
|
double * |
vect, |
|
|
double |
a = 1.0 |
|
) |
| |
|
static |
Definition at line 86 of file RandStudentT.cc.
88{
89 for( double* v = vect; v != vect + size; ++v )
91}
References shoot().
◆ shootArray() [2/2]
void CLHEP::RandStudentT::shootArray |
( |
HepRandomEngine * |
anEngine, |
|
|
const int |
size, |
|
|
double * |
vect, |
|
|
double |
a = 1.0 |
|
) |
| |
|
static |
Definition at line 93 of file RandStudentT.cc.
96{
97 for( double* v = vect; v != vect + size; ++v )
98 *v =
shoot(anEngine,a);
99}
References shoot().
◆ showEngineStatus()
void CLHEP::HepRandom::showEngineStatus |
( |
| ) |
|
|
staticinherited |
◆ defaultA
double CLHEP::RandStudentT::defaultA |
|
private |
◆ localEngine
◆ seedTable
const long CLHEP::HepRandom::seedTable |
|
staticprotectedinherited |
The documentation for this class was generated from the following files: