#include <guma_random.h>
Static Public Methods | |
double | des_random (bool reset, gul::uint32 *idum) |
double | Random (void) |
Static Public Attributes | |
GULAPI gul::uint32 | cycle = 1 |
GULAPI gul::uint32 | sequence = 1 |
GULAPI bool | initialized = false |
|
Definition at line 47 of file guma_random.h. References LL, guma::PseudoDes(), and sequence. Referenced by Random().
00048 { 00049 const double factor = 1.0/((double)LL(0x100000000)); 00050 gul::uint32 irword,lword; 00051 00052 if( reset ) 00053 { 00054 sequence = *idum; 00055 *idum = 1; 00056 } 00057 irword = *idum; 00058 lword = sequence; 00059 00060 PseudoDes( &lword, &irword ); 00061 00062 (*idum)++; 00063 00064 return ((double)irword) * factor; 00065 } |
|
Definition at line 67 of file guma_random.h. References cycle, des_random(), guma::GetSeed(), and initialized.
00068 { 00069 if( !initialized ) 00070 { 00071 initialized = true; 00072 cycle = GetSeed(); 00073 return des_random( true, &cycle ); 00074 } 00075 return des_random( false, &cycle ); 00076 } |
|
Definition at line 85 of file guma_random.cpp. Referenced by Random(). |
|
Definition at line 83 of file guma_random.cpp. Referenced by Random(). |
|
Definition at line 84 of file guma_random.cpp. Referenced by des_random(). |