Go to the first, previous, next, last section, table of contents.


CNDiscUniform -- Discrete Uniform Distribution

SYNOPSIS

#include <CNCL/DiscUniform.h>

TYPE

CN_DISCUNIFORM

BASE CLASSES

CNRandom

DERIVED CLASSES

None

RELATED CLASSES

CNRNG

DESCRIPTION

CNDiscUniform is a discrete uniform distribution with interval limits low and high. It generates discrete (i.e. integer) values.

Constructors:

CNDiscUniform();
CNDiscUniform(CNParam *param);
CNDiscUniform(long low, long high, CNRNG *gen);
Initializes a CNDiscUniform distribution with a base random number generator gen and the parameters low and high.

In addition to the member functions required by CNCL, CNDiscUniform provides:

long low();
long low(long x);
long high();
long high(long x);
Gets/sets the values for the interval limits.
virtual double operator() ();
Draws a discrete uniform distributed random number.


Go to the first, previous, next, last section, table of contents.