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


CNDiracTab -- Distribution from Table of CDF

SYNOPSIS

#include <CNCL/DiracTab.h>

TYPE

CN_DIRACTAB

BASE CLASSES

CNRandom

DERIVED CLASSES

None

RELATED CLASSES

CNRNG

DESCRIPTION

CNDiracTab generates random numbers according to a table with the distribution function.

Constructors:

CNDiracTab();
CNDiracTab(CNParam *param);
CNDiracTab(CNDiracTabEntry *tab, long length, CNRNG *gen);
Initializes a CNDiracTab distribution with a base random number generator gen and a table tab with length length. Example:
CNDiracTabEntry datafield[] = {{ 2, 0.1 },{ 4, 0.3 }, { 6, 0.6 }};
CNDiracTab example(datafield, 3, &generator);

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

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


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