Implements the P2 algorithm, which calculates quantile values without storing the observations. More...
#include <cpsquare.h>
Public Member Functions | |
Constructors, destructor, assignment. | |
cPSquare (const cPSquare &r) | |
cPSquare (const char *name=NULL, int cells=10) | |
virtual | ~cPSquare () |
cPSquare & | operator= (const cPSquare &res) |
Redefined cObject member functions. | |
virtual cPSquare * | dup () 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 void | setRange (double, double) |
virtual void | setRangeAuto (int, double) |
virtual void | setRangeAutoLower (double, int, double) |
virtual void | setRangeAutoUpper (double, int, double) |
virtual void | setNumFirstVals (int) |
virtual int | getNumCells () const |
virtual double | getBasepoint (int k) const |
virtual double | getCellValue (int k) const |
virtual double | getCDF (double x) const |
virtual double | getPDF (double x) const |
virtual double | random () const |
virtual void | merge (const cStatistic *other) |
virtual void | saveToFile (FILE *) const |
virtual void | loadFromFile (FILE *) |
Protected Member Functions | |
virtual void | collectTransformed (double val) |
Implements the P2 algorithm, which calculates quantile values without storing the observations.
virtual std::string cPSquare::detailedInfo | ( | ) | const [virtual] |
Produces a multi-line description of the object's contents.
See cObject for more details.
Reimplemented from cDensityEstBase.
virtual cPSquare* cPSquare::dup | ( | ) | const [inline, virtual] |
virtual double cPSquare::getBasepoint | ( | int | k | ) | const [virtual] |
Returns the kth cell boundary.
Note that because of the P2 algorithm, cell boundaries are shifting during data collection, thus getCellValue() and other methods based on getCellValue() and getBasepoint() return approximate values.
Implements cDensityEstBase.
virtual void cPSquare::merge | ( | const cStatistic * | other | ) | [virtual] |
Merging is not supported by this class.
This method throws an error.
Reimplemented from cDensityEstBase.
Assignment operator.
The name member is not copied; see cNamedObject's operator=() for more details.
virtual void cPSquare::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 cPSquare::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 cPSquare::random | ( | ) | const [virtual] |