Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

fastjet::BasicRandom< double > Class Template Reference

template specialization (double) for the BasicRandom template class. More...

#include <BasicRandom.hh>

List of all members.

Public Types

typedef double value_type
typedef unsigned int size_type
typedef value_typepointer

Public Member Functions

 BasicRandom (int __s1=12345, int __s2=67890)
 constructor that takes two integers to specify the seed
value_type operator() ()
 return a single pseudorandom double number, in the range 0.0 to 1.0 (not sure whether this range is open or closed)
void operator() (size_type __n, pointer __res)
 given a pointer __res to the beginning of an array, fill that array with __n random numbers
void randomize (void *__iseed)
 (re)initialize the random number generator from an array of seeds
void print_info (std::ostream &__os=std::cout)
 print information about the generator to the stream

Static Public Member Functions

static value_type min ()
 minimum value returned by the generator
static value_type max ()
 maximum value returned by the generator

Private Attributes

int _M_iseed [2]


Detailed Description

template<>
class fastjet::BasicRandom< double >

template specialization (double) for the BasicRandom template class.

Definition at line 101 of file BasicRandom.hh.


Member Typedef Documentation

typedef value_type* fastjet::BasicRandom< double >::pointer
 

Definition at line 105 of file BasicRandom.hh.

typedef unsigned int fastjet::BasicRandom< double >::size_type
 

Definition at line 104 of file BasicRandom.hh.

typedef double fastjet::BasicRandom< double >::value_type
 

Definition at line 103 of file BasicRandom.hh.


Member Function Documentation

fastjet::BasicRandom< double >::BasicRandom int  __s1 = 12345,
int  __s2 = 67890
[inline, explicit]
 

constructor that takes two integers to specify the seed

Definition at line 108 of file BasicRandom.hh.

00108                                                            {
00109     _M_iseed[0] = __s1;
00110     _M_iseed[1] = __s2;
00111   }

static value_type fastjet::BasicRandom< double >::max  )  [inline, static]
 

maximum value returned by the generator

Definition at line 136 of file BasicRandom.hh.

00136 { return 1.0;}

static value_type fastjet::BasicRandom< double >::min  )  [inline, static]
 

minimum value returned by the generator

Definition at line 134 of file BasicRandom.hh.

00134 { return 0.0;}

void fastjet::BasicRandom< double >::operator() size_type  __n,
pointer  __res
[inline]
 

given a pointer __res to the beginning of an array, fill that array with __n random numbers

Definition at line 121 of file BasicRandom.hh.

00121                                                  {
00122     for(size_type __i = 0; __i < __n; __i++) 
00123       __res[__i] = this -> operator()(); 
00124   }

value_type fastjet::BasicRandom< double >::operator()  )  [inline]
 

return a single pseudorandom double number, in the range 0.0 to 1.0 (not sure whether this range is open or closed)

Definition at line 115 of file BasicRandom.hh.

References fastjet::__default_random_generator().

00115                            { 
00116     return 4.6566128752457969241e-10*__default_random_generator(_M_iseed);
00117   }

void fastjet::BasicRandom< double >::print_info std::ostream &  __os = std::cout  )  [inline]
 

print information about the generator to the stream

Definition at line 139 of file BasicRandom.hh.

00139                                               {
00140     __os<<"BasicRandom<double> : "<<_M_iseed[0]<<", "<<_M_iseed[1]<<std::endl;
00141   }

void fastjet::BasicRandom< double >::randomize void *  __iseed  )  [inline]
 

(re)initialize the random number generator from an array of seeds

Definition at line 127 of file BasicRandom.hh.

00127                                 {
00128     int *__new_seed = (int*) __iseed;
00129     _M_iseed[0] = __new_seed[0];
00130     _M_iseed[1] = __new_seed[1];
00131   }


Member Data Documentation

int fastjet::BasicRandom< double >::_M_iseed[2] [private]
 

Definition at line 144 of file BasicRandom.hh.


The documentation for this class was generated from the following file:
Generated on Mon Apr 2 20:58:20 2007 for fastjet by  doxygen 1.4.2