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


CNInterTab -- Distribution from Table of CDF (Interpolated)

SYNOPSIS

#include <CNCL/InterTab.h>

TYPE

CN_INTERTAB

BASE CLASSES

CNTab

DERIVED CLASSES

None

RELATED CLASSES

CNRNG

DESCRIPTION

CNInterTab is a class for generating random numbers from a table. It works as CNTab, but the values are interpolated between the table entries.

Constructors:

CNInterTab();
CNInterTab(CNParam *param);
CNInterTab(double *tab, long length, CNRNG *gen);
Initializes a CNInterTab distribution with a base random number generator gen, a table with the samples tab and the length of the table length. Example:
double datafield[]={ 2, 4, 6, 8, 10, 12 };
CNInterTab ex(datafield, 6, generator);

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

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


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