Classes | Functions | Variables

/Users/garethloy/Musimathics/Musimat1.2/include/Random.h File Reference

Pseudorandom class. More...

#include "Aliases.h"

Go to the source code of this file.

Classes

class  Random

Functions

Integer LCRandom ()
 Didactic wrapper for lCRandom method.
Integer IRandom (Integer L, Integer U)
 Didactic wrapper for Integer random method.
Integer SeedRandom (Integer seed)
 Didactic wrapper for seed method.
Integer Time ()
 Return elapsed seconds since epoch.
Real Random (Real L=0.0, Real U=1.0)
 Didactic wrapper for random method.
Integer Random (Integer L, Integer U)
 Integer didactic wrapper for random method.

Variables

const Integer Musimat_Random_Seed = 2147483647
 Random class provides a set of Real and Integer linear congruential random operations.

Detailed Description

Pseudorandom class.

Definition in file Random.h.


Function Documentation

Integer IRandom ( Integer  L,
Integer  U 
)

Didactic wrapper for Integer random method.

Definition at line 32 of file Random.cpp.

References ran, Random::random(), and Return.

Referenced by RandomRow(), and randTendency().

{
        Return ran.random( L, U ); 
}
Integer LCRandom (  )

Didactic wrapper for lCRandom method.

Definition at line 20 of file Random.cpp.

References Random::lCRandom(), ran, and Return.

Real Random ( Real  L = 0.0,
Real  U = 1.0 
)

Didactic wrapper for random method.

Definition at line 22 of file Random.cpp.

References ran, Random::random(), and Return.

{
        Return ran.random( L, U );
}
Integer Random ( Integer  L,
Integer  U 
)

Integer didactic wrapper for random method.

Definition at line 27 of file Random.cpp.

References ran, Random::random(), and Return.

{
        Return ran.random( L, U ); 
}
Integer SeedRandom ( Integer  seed )

Didactic wrapper for seed method.

Definition at line 37 of file Random.cpp.

References ran, Return, and Random::seed().

{
        Return ran.seed( seed ); 
}
Integer Time (  )

Return elapsed seconds since epoch.

Get the elapsed seconds since the epoch by calling system time function.

Definition at line 47 of file Random.cpp.

References Random::getTime(), ran, and Return.


Variable Documentation

const Integer Musimat_Random_Seed = 2147483647

Random class provides a set of Real and Integer linear congruential random operations.

Note, this implementation does not produce very high-quality randomness. The methods here are good for understanding general principles, but for better numerical results see Press, et. al., "Numerical Recipes in C", Cambridge University Press, 198

Definition at line 30 of file Random.h.