Main Page | Class Hierarchy | Class List | File List | Class Members

DstMeasure Class Reference

A DstMeasure is a set of populations for distribution metrics. More...

#include <measure.h>

Inheritance diagram for DstMeasure:

Object List of all members.

Public Member Functions

 DstMeasure ()
 Create an emptry DstMeasure.

 ~DstMeasure ()
 Do nothing.

void addSample (sample_t x, unsigned int id, unsigned int bin)
 Add a sample to a population bin.

PopulationgetPopulation (unsigned int id, unsigned int bin)
 Return the population of a given index/bin.

PopulationgetPopulationCDF (unsigned int id, unsigned int bin)
 Return the CDF population of a given index/bin.

PopulationgetMeanPopulation (unsigned int id)
 Return the mean population.

PopulationgetMedianPopulation (unsigned int id)
 Return the mediam population.

PopulationgetPercentile95Population (unsigned int id)
 Return the 95th percentile population.

PopulationgetPercentile99Population (unsigned int id)
 Return the 99th percentile population.

void computeDerivedStatistics (unsigned int id)
 Compute the derived statistics (mean, quantiles) if not already done.

bool getValid (unsigned int id, unsigned int bin)
 Return true if the population with a given index exists.

unsigned int getSize () const
 Return the number of populations in this measure.

unsigned int getSize (unsigned int id)
 Return the number of bins in the given index.

void setBinSize (sample_t s)
 Set the bin size.

void setDistLower (sample_t s)
 Set the distribution lower bound.

sample_t getBinSize () const
 Get the bin size.

sample_t getDistLower () const
 Get the distribution lower bound.


Private Attributes

std::vector< std::vector<
Population > > 
populations
 Array of array of populations.

std::vector< std::vector<
Population > > 
populationsCDF
 Array of array of populations. Cumulative wrt the previous bins.

std::vector< std::vector<
bool > > 
valid
 Bit array to check if the i-th entry of populations is valid.

sample_t binSize
 Bin size.

sample_t distLower
 Distribution lower bound.

bool binSizeSet
 True if the bin size has been set.

bool distLowerSet
 True if the distribution lower bound has been set.

std::vector< PopulationmeanPopulations
 Populations of average values.

std::vector< PopulationmedianPopulations
 Populations of median values.

std::vector< Populationpercentile95Populations
 Populations of 95th percentile values.

std::vector< Populationpercentile99Populations
 Populations of 99th percentile values.

std::vector< unsigned int > derivedLast
 Record the last size of the bins populations.


Detailed Description

A DstMeasure is a set of populations for distribution metrics.

Each element in a DstMeasure is the probability that a given sample fits in a given bin. The size of the bin and the minimum value of the distribution are part of the DstMeasure data structure. In addition to the cumulative distribution function and the probability mass function, the mean value and quantiles are derived from the DstMeasure.

The bin size and the mininmum data structure must be set before computing the quantile values. Also, samples must be added in bin order. If they are not, then the cumulative values will not be meaningful.


Member Data Documentation

std::vector< std::vector<Population> > DstMeasure::populationsCDF [private]
 

Array of array of populations. Cumulative wrt the previous bins.

Note that the populations and populationsCDF always have the same size and structure. Thus, the valid structure is meaningful for both these data structures.


The documentation for this class was generated from the following files:
Generated on Tue May 30 08:09:56 2006 for ns2measure by doxygen 1.3.7