User Manual, Developers Guide and API Documentation

wns::distribution::CDFTable Class Reference

Draw a random number from a given tabulated distribution (CDF). More...

#include <distribution/CDFTable.hpp>

Inheritance diagram for wns::distribution::CDFTable:

Inheritance graph
[legend]
Collaboration diagram for wns::distribution::CDFTable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CDFTable (wns::rng::RNGen *rng, const pyconfig::View &config)
 CDFTable (const pyconfig::View &config)
virtual double getMean () const
 Mean value of the distribution.
virtual double operator() ()
 returns the random value according to the distribution.
virtual ~CDFTable ()

Private Member Functions

virtual std::string paramString () const
 returns a string describing distribution and parameters

Private Attributes

StandardUniform dis_
double mean_
wns::container::RangeMap
< double, double
rangeMap_


Detailed Description

The values from the table will not be interpolated. This means, if you provide a table with 10 enrtries you will get randomly one of these 10 values according to its probability in the table.

E.g.: Providing a random number according to the statistics of typical IP packet sizes in the internet

Author:
Rainer Schoenen <rs@comnets.rwth-aachen.de>

Definition at line 51 of file CDFTable.hpp.


Constructor & Destructor Documentation

CDFTable::CDFTable ( const pyconfig::View config  )  [explicit]

Definition at line 40 of file CDFTable.cpp.

CDFTable::CDFTable ( wns::rng::RNGen rng,
const pyconfig::View config 
) [explicit]

Definition at line 62 of file CDFTable.cpp.

CDFTable::~CDFTable (  )  [virtual]

Definition at line 84 of file CDFTable.cpp.


Member Function Documentation

double CDFTable::getMean (  )  const [virtual]

Implements wns::distribution::IHasMean.

Definition at line 95 of file CDFTable.cpp.

double CDFTable::operator() (  )  [virtual]

Implements wns::distribution::Distribution.

Definition at line 89 of file CDFTable.cpp.

std::string CDFTable::paramString (  )  const [private, virtual]

Implements wns::distribution::Distribution.

Definition at line 101 of file CDFTable.cpp.


Member Data Documentation

Definition at line 75 of file CDFTable.hpp.

Definition at line 79 of file CDFTable.hpp.

Definition at line 77 of file CDFTable.hpp.


The documentation for this class was generated from the following files:

Generated on Sat May 26 03:32:52 2012 for openWNS by  doxygen 1.5.5