00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "RandExponential.h"
00032
00033 RandExponential::~RandExponential() {
00034 if ( deleteEngine ) delete localEngine;
00035 }
00036
00037 HepDouble RandExponential::operator()() {
00038 return fire();
00039 }
00040
00041 void RandExponential::shootArray( const HepInt size, HepDouble* vect,
00042 HepDouble mean )
00043 {
00044 register HepInt i;
00045
00046 for (i=0; i<size; ++i)
00047 vect[i] = shoot(mean);
00048 }
00049
00050 void
00051 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00052 RandExponential::shootArray( vector<HepDouble>& vec,
00053 HepDouble mean )
00054 #else
00055 RandExponential::shootArray( vector<HepDouble,allocator<HepDouble> >& vec,
00056 HepDouble mean )
00057 #endif
00058 {
00059 for (unsigned int i=0; i<vec.size(); ++i)
00060 vec[i] = shoot(mean);
00061 }
00062
00063 void RandExponential::shootArray( HepRandomEngine* anEngine, const HepInt size,
00064 HepDouble* vect, HepDouble mean )
00065 {
00066 for (int i=0; i<size; ++i)
00067 vect[i] = shoot(anEngine, mean);
00068 }
00069
00070 void
00071 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00072 RandExponential::shootArray( HepRandomEngine* anEngine,
00073 vector<HepDouble>& vec, HepDouble mean )
00074 #else
00075 RandExponential::shootArray( HepRandomEngine* anEngine,
00076 vector<HepDouble, allocator<HepDouble> >& vec,
00077 HepDouble mean )
00078 #endif
00079 {
00080 for (unsigned int i=0; i<vec.size(); ++i)
00081 vec[i] = shoot(anEngine, mean);
00082 }
00083
00084 void RandExponential::fireArray( const HepInt size, HepDouble* vect,
00085 HepDouble mean )
00086 {
00087 register HepInt i;
00088
00089 for (i=0; i<size; ++i)
00090 vect[i] = fire(mean);
00091 }
00092
00093 void
00094 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00095 RandExponential::fireArray( vector<HepDouble>& vec,
00096 HepDouble mean )
00097 #else
00098 RandExponential::fireArray( vector<HepDouble, allocator<HepDouble> >& vec,
00099 HepDouble mean )
00100 #endif
00101 {
00102 for (unsigned int i=0; i<vec.size(); ++i)
00103 vec[i] = fire(mean);
00104 }