//---------------------------------------------------------------------- // SPECIFICATION FILE (rand2.h) // This module exports a class for pseudorandom number generation // Machine dependency: long ints must be at least 32 bits (4 bytes). //---------------------------------------------------------------------- #ifndef rand2_h #define rand2_h 1 class RandGen { // ABSTRACTLY: a sequence of psuedorandom numbers public: float NextRand(); // POST: FCTVAL == next pseudorandom number // && 0.0 < FCTVAL < 1.0 //constructors: RandGen(long initSeed ); // PRE: initSeed >= 1 // POST: Pseudorandom sequence initialized using initSeed RandGen(); // POST: Pseudorandom sequence initialized using // a default initial seed #include "rand2.pri" }; #endif