#ifndef RANDOMGENERATION_HH #define RANDOMGENERATION_HH /* * CS 70, Spring 2001, Assignment 8 * * Declarations useful in processing random numbers. * * The random-number functions are not packaged into a class. This * design decision is an outgrowth of the history of C and C++. It * would be better to build a relatively complicated class to support * random numbers, including provision of multiple independent * streams and the ability to generate a number of different * distributions. * * The random-generation package currently includes two functions: * * setRandomSeed Initializes the RNG seed from the system * time. If a specific random seed is desired * for reproducibility, srand48 should be called * instead of or after this function. * expRand Returns an exponentially distributed random * number with the given mean. */ void setRandomSeed(); // Set a "random" random seed based on // ..the system time double expRand(double mean); // Generate an exponentially // ..distributed random number #endif // RANDOMGENERATION_HH