Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cKSplit Class Reference

#include <cksplit.h>

Inheritance diagram for cKSplit::

cDensityEstBase cStdDev cStatistic cObject List of all members.

Public Types

typedef int (* CritFunc )(const cKSplit &, cKSplit::Grid &, int, double *)
typedef double (* DivFunc )(const cKSplit &, cKSplit::Grid &, double, double *)

Public Methods

Constructors, destructor, assignment.
 cKSplit (const cKSplit &r)
 cKSplit (const char *name=NULL)
virtual ~cKSplit ()
cKSplit& operator= (const cKSplit &res)
Redefined cObject member functions.
virtual cObjectdup () const
virtual void writeContents (ostream &os)
virtual int netPack ()
virtual int netUnpack ()
Redefined member functions from cStatistic and its subclasses.
virtual void transform ()
virtual int cells () const
virtual double basepoint (int k) const
virtual double cell (int k) const
virtual double pdf (double x) const
virtual double cdf (double x) const
virtual double random () const
virtual void saveToFile (FILE *) const
virtual void loadFromFile (FILE *)
Configuring the k-split algorithm.
void setCritFunc (CritFunc _critfunc, double *_critdata)
void setDivFunc (DivFunc _divfunc, double *_divdata)
void rangeExtension (bool enabled)
Querying the k-split data structure.
int treeDepth () const
int treeDepth (Grid &grid) const
double realCellValue (Grid &grid, int cell) const
void printGrids () const
Gridgrid (int k) const
GridrootGrid () const

Protected Methods

virtual void collectTransformed (double val)

Detailed Description

Implements k-split, an adaptive histogram-like density estimation algorithm.

See also:
Iterator Grid


Constructor & Destructor Documentation

cKSplit::cKSplit ( const cKSplit & r )
 

Copy constructor.

cKSplit::cKSplit ( const char * name = NULL ) [explicit]
 

Constructor.

cKSplit::~cKSplit ( ) [virtual]
 

Destructor.


Member Function Documentation

double cKSplit::basepoint ( int k ) const [virtual]
 

Returns the kth cell boundary.

Reimplemented from cDensityEstBase.

double cKSplit::cdf ( double x ) const [virtual]
 

Returns the value of the Cumulated Density Function at a given x.

Reimplemented from cDensityEstBase.

double cKSplit::cell ( int k ) const [virtual]
 

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

Reimplemented from cDensityEstBase.

int cKSplit::cells ( ) const [virtual]
 

Returns the number of histogram cells used.

Reimplemented from cDensityEstBase.

void cKSplit::collectTransformed ( double val ) [protected, virtual]
 

Called internally by collect(), this method updates the k-split data structure with the new value.

Reimplemented from cDensityEstBase.

cObject * cKSplit::dup ( ) const [inline, virtual]
 

Creates and returns an exact copy of this object. See cObject for more details.

Reimplemented from cStdDev.

Grid & cKSplit::grid ( int k ) const [inline]
 

Returns the kth grid in the k-split data structure.

void cKSplit::loadFromFile ( FILE * ) [virtual]
 

Reads the object data from a file, in the format written out by saveToFile().

Reimplemented from cDensityEstBase.

int cKSplit::netPack ( ) [virtual]
 

Serializes the object into a PVM or MPI send buffer. Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cDensityEstBase.

int cKSplit::netUnpack ( ) [virtual]
 

Deserializes the object from a PVM or MPI receive buffer. Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cDensityEstBase.

cKSplit & cKSplit::operator= ( const cKSplit & res )
 

Assignment operator. The name member doesn't get copied; see cObject's operator=() for more details.

double cKSplit::pdf ( double x ) const [virtual]
 

Returns the value of the Probability Density Function at a given x.

Reimplemented from cDensityEstBase.

void cKSplit::printGrids ( ) const
 

Dumps the contents of the k-split data structure to ev.

double cKSplit::random ( ) const [virtual]
 

Generates a random number based on the collected data. Uses the random number generator set by setGenK().

Reimplemented from cDensityEstBase.

void cKSplit::rangeExtension ( bool enabled )
 

Enables/disables range extension. If range extension is enabled, a new observation that falls outside the k-split range (ie. outside the root grid) will cause the range to be expanded (i.e. new root grid(s) to be placed above the current root grid). If range extension is disabled, such observations will simply be counted as underflows or overflows.

double cKSplit::realCellValue ( Grid & grid,
int cell ) const
 

Returns the actual amount of observations in cell 'cell' of 'grid'. This is not necessarily an integer value because of previous cell splits.

Grid & cKSplit::rootGrid ( ) const [inline]
 

Returns the root grid of the k-split data structure.

void cKSplit::saveToFile ( FILE * ) const [virtual]
 

Writes the contents of the object into a text file.

Reimplemented from cDensityEstBase.

void cKSplit::setCritFunc ( CritFunc _critfunc,
double * _critdata )
 

Configures the k-split algorithm by supplying a custom split criterion function.

void cKSplit::setDivFunc ( DivFunc _divfunc,
double * _divdata )
 

Configures the k-split algorithm by supplying a custom cell division function.

void cKSplit::transform ( ) [virtual]
 

Transforms the table of pre-collected values into the k-split data structure.

Reimplemented from cDensityEstBase.

int cKSplit::treeDepth ( Grid & grid ) const
 

Returns the depth of the k-split tree measured from the specified grid.

int cKSplit::treeDepth ( ) const
 

Returns the depth of the k-split tree.

void cKSplit::writeContents ( ostream & os ) [virtual]
 

Writes textual information about this object to the stream. See cObject for more details.

Reimplemented from cDensityEstBase.


The documentation for this class was generated from the following file:
Generated at Mon Jun 16 23:37:32 2003 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001