Protected Member Functions

Detailed Description

Provides several pure virtual functions, so it is an abstract class, no instances can be created.

For the histogram classes, you need to specify the number of cells and the range. Range can either be set explicitly or you can choose automatic range determination.

Automatic range estimation works in the following way:

The first num_firstvals observations are stored.

After having collected a given number of observations, the actual histogram is set up. The range (min, max) of the initial values is expanded range_ext_factor times, and the result will become the histogram's range (rangemin, rangemax). Based on the range, the cells are layed out. Then the initial values that have been stored up to this point will be transferred into the new histogram structure and their store is deleted -- this is done by the transform() function.

You may also explicitly specify the lower or upper limit and have the other end of the range estimated automatically. The setRange...() member functions of cDensityEstBase deal with setting up the histogram range. It also provides pure virtual functions transform() etc.

Subsequent observations are placed in the histogram structure. If an observation falls out of the histogram range, the underflow or the overflowcell is incremented.

Member Function Documentation

virtual void cDensityEstBase::collect

(

double

value

)

[virtual]

Collects one value.

Before the histogram was transformed, this method simply adds the value to the table of pre-collected values. When the number of pre-collected observations reaches a limit, the transform() method is called. After transformation, it calls collectTransformed() to update the stored statistics with this value.

Legal values for k are 0 through getNumCells(), that is, there' one more basepoint than the number of cells. Basepoint(0) returns the low end of the first cell, and getBasepoint(getNumCells()) returns the high end of the last histogram cell. This method is pure virtual, implementation is provided in subclasses.

Returns the estimated value of the Probability Density Function within the kth cell.

This method simply divides the number of observations in cell k with the cell size and the number of total observations collected. Note that before transformation, getCellValue() and also this method may return zero. See transform().

virtual double cDensityEstBase::getCellValue

(

int

k

)

const [pure virtual]

Returns the number of observations that fell into the kth histogram cell.

Before transformation, this method may return zero. See transform(). This method is pure virtual, implementation is provided in subclasses.

Selects a histogram range setup method where the range will be determined entirely from a set of pre-collected values.

When called, the histogram range will be determined from the first num_firstvals values, extending their range symmetrically by range_ext_fact. For example, after a call to setRangeAuto(100, 1.3), the histogram will be set up after pre-collecting 100 values, the range being the range of the 100 pre-collected values extended 1.3 times symmetrically.