Go to the previous, next section.

CNGeometric -- Geometric Distributed Random Numbers

SYNOPSIS

#include <CNCL/Geometric.h>

TYPE

CN_GEOMETRIC

BASE CLASSES

CNRandom

DERIVED CLASSES

None

RELATED CLASSES

CNRNG

DESCRIPTION

CNGeometric is a class for generating geometric distributed random numbers.

Constructors:

CNGeometric();
CNGeometric(CNParam *param);
CNGeometric(double mean, CNRNG *gen);
Initializes a CNGeometric distribution with a base random number generator gen and the value mean as a parameter for the random generator.

NOTE: Please do NOT take this parameter as the distrbution`s mean (`MEAN`) value. This can be calculated as:

  MEAN = 1 / ( 1 - mean )

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

double mean();
double mean(double x);
Gets/sets the values for mean.

virtual double operator() ();
Draws a geometric distributed random number.

Go to the previous, next section.