cKSplit Class Reference
[Statistical data collection]

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

#include <cksplit.h>

Inheritance diagram for cKSplit:
cDensityEstBase cStdDev cStatistic cOwnedObject cNamedObject cObject

List of all members.

Classes

struct  Grid
 Supporting struct for cKSplit. More...
class  Iterator
 Walks along cells of the distribution stored in a cKSplit object. More...

Public Types

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

Public Member Functions

Constructors, destructor, assignment.

 cKSplit (const cKSplit &r)
 cKSplit (const char *name=NULL)
virtual ~cKSplit ()
cKSplitoperator= (const cKSplit &res)
Redefined cObject member functions.

virtual cKSplitdup () const
virtual std::string detailedInfo () const
virtual void parsimPack (cCommBuffer *buffer)
virtual void parsimUnpack (cCommBuffer *buffer)
Redefined member functions from cStatistic and its subclasses.

virtual void transform ()
virtual int getNumCells () const
virtual double getBasepoint (int k) const
virtual double getCellValue (int k) const
virtual double getPDF (double x) const
virtual double getCDF (double x) const
virtual void merge (const cStatistic *other)
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 getTreeDepth () const
int getTreeDepth (Grid &grid) const
double getRealCellValue (Grid &grid, int cell) const
void printGrids () const
GridgetGrid (int k) const
GridgetRootGrid () const

Protected Member Functions

virtual void collectTransformed (double val)

Detailed Description

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

See also:
Iterator Grid

Member Enumeration Documentation

anonymous enum

K is the grid size of the algorithm.

It must be 2, or a >=3 odd number.


Member Function Documentation

virtual std::string cKSplit::detailedInfo (  )  const [virtual]

Produces a multi-line description of the object's contents.

See cObject for more details.

Reimplemented from cDensityEstBase.

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

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cStdDev.

double cKSplit::getRealCellValue ( 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.

virtual void cKSplit::merge ( const cStatistic other  )  [virtual]

Merging is not supported by this class.

This method throws an error.

Reimplemented from cDensityEstBase.

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

Assignment operator.

The name member is not copied; see cNamedObject's operator=() for more details.

virtual void cKSplit::parsimPack ( cCommBuffer buffer  )  [virtual]

Serializes the object into an MPI send buffer.

Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cDensityEstBase.

virtual void cKSplit::parsimUnpack ( cCommBuffer buffer  )  [virtual]

Deserializes the object from an MPI receive buffer.

Used by the simulation kernel for parallel execution. See cObject for more details.

Reimplemented from cDensityEstBase.

virtual double cKSplit::random (  )  const [virtual]

Generates a random number based on the collected data.

Uses the random number generator set by setGenK().

Reimplemented from cStdDev.

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 getGrid(s) to be placed above the current root grid). If range extension is disabled, such observations will simply be counted as underflows or overflows.


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 11:16:28 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3