rndgen.h File Reference

Random number generator stub functions and classes. More...

#include <stdlib.h>
#include <math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

Include dependency graph for rndgen.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  UniformDoubleRndGen
 uniform double random generator More...
class  UniformIntRndGen
 uniform long int random generator More...
class  ExponentialRndGen
 exponential random generator More...
class  GaussianRndGen
 Gaussian random generator. More...
class  Geometric0RndGen
 Geometric random generator. More...
class  Geometric1RndGen
 Geometric random generator. More...
class  ParetoRndGen
 Pareto random generator. More...
class  WeibullRndGen
 Weibull random generator. More...
class  RayleighRndGen
 Rayleigh random generator. More...

Functions

void SetSeed (char *genType, int seed)
 Set the random generator type and the seed.
double rndUniformDouble (double low=0.0, double high=1.0)
 uniform double random generator
long int rndUniformInt (long int low=0, long int high=1)
 uniform long int random generator
double rndExponential (double M)
 exponential random generator
double rndGaussian (double M, double sigma)
 Gaussian random generator.
unsigned int rndGeometric0 (double M)
 Geometric random generator.
unsigned int rndGeometric1 (double M)
 Geometric random generator.
long int rndNegativeBinomial (long r, float p)
 Negative Binomial random generator.
double rndPareto (double location, double shape)
 Pareto random generator.
double rndWeibull (double location, double scale, double shape)
 Weibull random generator.
double rndRayleigh (double sigma)
 Rayleigh random generator.
void rndShuffle (void *vect, size_t size, size_t elem_size)
 Shuffle an array.


Detailed Description

Random number generator stub functions and classes.

The functions and classes defined here are designed as stub against a 'real' random number generator. Almost each random number generation type can be called as a direct function (named rng<genType>) or via a class (named <gentype>RndGen).

Each class provide a constructor where you must set the distribution parameters and a public function get() returning the random number.


Generated on Wed Dec 22 23:23:48 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo