46 #include "RandomEngine.h"
66 inline HepDouble flat();
72 inline void flatArray(
const HepInt size, HepDouble* vect);
74 #ifndef ST_NO_TEMPLATE_DEF_ARGS
75 void flatArray(vector<HepDouble>&);
77 void flatArray(vector<HepDouble, allocator<HepDouble> >&);
82 const HepInt size, HepDouble* vect);
83 #ifndef ST_NO_TEMPLATE_DEF_ARGS
85 vector<HepDouble>& vec);
88 vector<HepDouble, allocator<HepDouble> >& vec);
93 virtual HepDouble operator()();
100 static void setTheSeed(
long seed, HepInt lux=3);
103 static long getTheSeed();
106 static void setTheSeeds(
const long* seeds, HepInt aux=-1);
109 static const long* getTheSeeds();
112 static void getTheTableSeeds (
long* seeds, HepInt index);
115 static HepRandom * getTheGenerator() {
return theGenerator; }
124 static void saveEngineStatus();
127 static void restoreEngineStatus();
130 static void showEngineStatus();
137 void setFlag( HepBoolean val ){set = val;}
139 HepBoolean getFlag() {
return set;}
141 void setVal( HepDouble nextVal ){nextGauss = nextVal;}
143 HepDouble getVal() {
return nextGauss;}
149 void setOldMean( HepDouble val ){oldm = val;}
151 HepDouble getOldMean() {
return oldm;}
153 HepDouble getMaxMean() {
return meanMax;}
155 void setPStatus(HepDouble sq, HepDouble alxm, HepDouble g) {
156 status[0] = sq; status[1] = alxm; status[2] = g;
159 HepDouble* getPStatus() {
return status;}
163 inline void setSeed(
long seed, HepInt lux);
166 inline long getSeed()
const;
169 inline void setSeeds(
const long* seeds, HepInt aux);
172 inline const long* getSeeds ()
const;
175 inline void getTableSeeds (
long* seeds, HepInt index)
const;
184 void saveStatus()
const;
187 void restoreStatus();
190 void showStatus()
const;
198 HepBoolean deleteEngine;
203 HepDouble status[3], oldm;
207 const HepDouble meanMax;
216 inline void HepRandom::setSeed(
long seed, HepInt lux) {
217 theEngine->setSeed(seed,lux);
220 inline void HepRandom::setSeeds(
const long* seeds, HepInt aux) {
221 theEngine->setSeeds(seeds,aux);
224 inline long HepRandom::getSeed()
const {
225 return theEngine->getSeed();
228 inline const long* HepRandom::getSeeds()
const {
229 return theEngine->getSeeds();
232 inline void HepRandom::getTableSeeds(
long* seeds, HepInt index)
const {
233 theEngine->getTableSeeds(seeds,index);
236 inline void HepRandom::saveStatus()
const {
237 theEngine->saveStatus();
240 inline void HepRandom::restoreStatus() {
241 theEngine->restoreStatus();
244 inline void HepRandom::showStatus()
const {
245 theEngine->showStatus();
248 inline HepDouble HepRandom::flat() {
249 return theEngine->flat();
252 inline void HepRandom::flatArray(
const HepInt size, HepDouble* vect) {
253 theEngine->flatArray(size,vect);
256 #ifdef ST_NO_TEMPLATE_DEF_ARGS
257 inline void HepRandom::flatArray(vector<HepDouble, allocator<HepDouble> >& vec)
259 inline void HepRandom::flatArray(vector<HepDouble>& vec)
262 theEngine->flatArray(vec);
267 return theNewEngine->flat();
271 const HepInt size, HepDouble* vect)
273 theNewEngine->flatArray(size,vect);
276 #ifdef ST_NO_TEMPLATE_DEF_ARGS
278 vector<HepDouble, allocator<HepDouble> >& vec)
281 vector<HepDouble>& vec)
284 theNewEngine->flatArray(vec);