Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

valuegen.h File Reference

Generators for various distributions, including random. More...

#include "stringparser.h"
#include "vgen.h"

Include dependency graph for valuegen.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.

Compounds

class  ValueGenerator
class  ValueGenerator_Correlate
class  ValueGenerator_Expression
class  ValueGenerator_Increment
class  ValueGenerator_Random
class  ValueGeneratorFactory
class  VGenFactory

Typedefs

typedef double (* randomgen_fnPtr )( double mean, double radius )
 General type for a random number generator. More...

typedef ValueGenerator<double> DGen
 Short name for typical usage. More...


Functions

double uniform_distribution ( double mean=0.5, double radius=0.5)
 Returns a random number from a uniform distribution with a given radius (that is, range/2) and mean. More...

double normal_distribution ( double mean=0.0, double radius=1.0)
 Returns a random number from the Gaussian distribution with the given sigma and mean. More...


Detailed Description

Generators for various distributions, including random.

Header:
/u/nn/cvsroot/lissom/src/valuegen.h,v 1.25 2000/06/27 06:40:42 jbednar Exp

Definition in file valuegen.h.


Typedef Documentation

typedef ValueGenerator<double> DGen
 

Short name for typical usage.

Definition at line 150 of file valuegen.h.

typedef double (* randomgen_fnPtr)( double mean, double radius )
 

General type for a random number generator.

Definition at line 28 of file valuegen.h.


Function Documentation

double normal_distribution ( double mean = 0.0,
double radius = 1.0 ) [inline]
 

Returns a random number from the Gaussian distribution with the given sigma and mean.

Uses the Box-Muller method from Numerical Recipes in C (Ch 7).

Definition at line 45 of file valuegen.h.

double uniform_distribution ( double mean = 0.5,
double radius = 0.5 ) [inline]
 

Returns a random number from a uniform distribution with a given radius (that is, range/2) and mean.

The radius is inclusive on the lower side and exclusive on the upper.

Definition at line 35 of file valuegen.h.


Generated at Mon Aug 21 00:31:12 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000