Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Math


Files

file  psRandom.h
 Random Number Generators

This file will hold the prototypes for procedures which allocate, free, and evaluate random number Generators.

file  psRandom.h
 Random Number Generators

This file will hold the prototypes for procedures which allocate, free, and evaluate random number Generators.


Data Structures

struct  psRandom
 Data structure for psRandom. More...

Enumerations

enum  psRandomType { PS_RANDOM_TAUS }
 Enumeration containing a flag for psRandom types. More...

Functions

psU64 p_psRandomGetSystemSeed ()
psRandompsRandomAlloc (psRandomType type, unsigned long seed)
 Allocates a psRandom struct.
void psRandomReset (psRandom *rand, unsigned long seed)
 Resets an existing psRandom struct.
double psRandomUniform (const psRandom *r)
 Random number generator based on a uniform distribution on [0,1).
double psRandomGaussian (const psRandom *r)
 Random number generator based on a Gaussian deviate, N(0,1).
double p_psRandomGaussian (const psRandom *r, double sigma)
 Random number generator based on a Gaussian deviate, N(0,1).
double psRandomPoisson (const psRandom *r, double mean)
 Random number generator based on a Poisson distribution with the given mean.


Enumeration Type Documentation

enum psRandomType
 

Enumeration containing a flag for psRandom types.

Enumerator:
PS_RANDOM_TAUS  A maximally equidistributed combined Tausworthe generator.

Definition at line 36 of file psRandom.h.


Function Documentation

double p_psRandomGaussian const psRandom r,
double  sigma
 

Random number generator based on a Gaussian deviate, N(0,1).

Uses gsl_ran_gaussian.

XXX: I created this since the above psLib spec for p_psRandomGaussian had no argument for sigma. Verify that with IfA.

Returns:
double: Random number.
Parameters:
r  psRandom struct for RNG

psU64 p_psRandomGetSystemSeed  ) 
 

psRandom* psRandomAlloc psRandomType  type,
unsigned long  seed
 

Allocates a psRandom struct.

Returns:
psRandom*: A new psRandom structure.
Parameters:
type  The type of RNG
seed  Known value with which to seed the RNG

double psRandomGaussian const psRandom r  ) 
 

Random number generator based on a Gaussian deviate, N(0,1).

Uses gsl_ran_gaussian.

Returns:
double: Random number.
Parameters:
r  psRandom struct for RNG

double psRandomPoisson const psRandom r,
double  mean
 

Random number generator based on a Poisson distribution with the given mean.

Uses gsl_ran_poisson.

Returns:
double: Random number.
Parameters:
r  psRandom struct for RNG
mean  Mean value

void psRandomReset psRandom rand,
unsigned long  seed
 

Resets an existing psRandom struct.

Returns:
void
Parameters:
rand  Existing psRandom struct to reset
seed  Known value with which to seed the RNG

double psRandomUniform const psRandom r  ) 
 

Random number generator based on a uniform distribution on [0,1).

Uses gsl_rng_uniform.

Returns:
double: Random number.
Parameters:
r  psRandom struct for RNG


Generated on Mon Jul 3 14:15:13 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4