quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_system.a #include <Random.h> Random(); boolean seed(long seed); double get();
description:Random rand; rand.seed(27); double value = rand.get();
static const String CLASS_NAME = L"Random";
enum ALGORITHM { UNIFORM = 0, GAUSSIAN, DEF_ALGORITHM = UNIFORM };
enum IMPLEMENTATION { SUBTRACTIVE = 0, CONGRUENTIAL, TRANSFORMATION, DEF_IMPLEMENTATION = SUBTRACTIVE };
Random Random::GLOBAL_UNIFORM(UNIFORM, SUBTRACTIVE);
Random Random::GLOBAL_GAUSSIAN(GAUSSIAN, TRANSFORMATION);
static const long US_MBIG = 1000000000;
static const long US_MSEED = 161803398;
static const long US_MZ = 0;
static const long US_MDIM = 56;
static const long US_CONST = 30;
static const double US_FAC = (1.0 / (double)US_MBIG);
static const long INV_RAND_MAX = 1.0 / RAND_MAX;
static const long DEF_SEED = 27;
static const long ERR = 1900;
ALGORITHM algorithm_d;
IMPLEMENTATION implementation_d;
long seed_d;
static Integral::DEBUG debug_level_d;
static MemoryManager mgr_d;
boolean is_valid_d;
long us_inext_d;
long us_inextp_d;
long us_ma_d[US_MDIM];
boolean gt_iset_d;
double gt_gset_d;
static const SysString& name();
static boolean diagnose(Integral::DEBUG debug_level);
static boolean setDebug(Integral::DEBUG level);
boolean debug(const unichar* message) const;
~Random();
Random(long seed = DEF_SEED);
Random(const Random& arg);
boolean assign(const Random& arg);
Random& operator=(const Random& arg_a);
i/o methods are omitted because this class can't write itself to an Sof file
boolean eq(const Random& arg);
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE ctype_a = Integral::DEF_CMODE);
Random(ALGORITHM alg, IMPLEMENTATION impl, long seed = DEF_SEED)
boolean setAlgorithm(ALGORITHM algorithm);
boolean setImplementation(IMPLEMENTATION implementation);
ALGORITHM getAlgorithm() const;
IMPLEMENTATION getImplementation() const;
boolean seed(long value = DEF_SEED);
double get();
operator double();
boolean init();
boolean compute();
boolean initUniformSubtractive();
boolean computeUniformSubtractive();
boolean initUniformCongruential();
boolean computeUniformCongruential();
boolean initGaussianTransform();
boolean computeGaussianTransform();
Random rand; double value = rand.get();
Random rand; rand.setAlgorithm(GAUSSIAN); rand.setImplementation(TRANSFORMATION); rand.seed((long)27);
for (long i = 0; i < 100; i++) { double value = rand.get(); }