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


CNBinomial -- Binomial Distribution

SYNOPSIS

#include <CNCL/Binomial.h>

TYPE

CN_BINOMIAL

BASE CLASSES

CNRandom

DERIVED CLASSES

None

RELATED CLASSES

CNRNG

DESCRIPTION

CNBinomial is a class for generating binomial distributed random numbers.

Constructors:

CNBinomial();
CNBinomial(CNParam *param);
CNBinomial(int n, double u, CNRNG *gen);
Initializes a CNBinomial distribution with a base random number generator gen, and the parameters n and u.

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

int n();
int n(int xn);
double u();
double u(double xu);
Gets/sets the values for n and u.
virtual double operator() ();
Draws a binomial distributed random number.


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