User Manual, Developers Guide and API Documentation

wns::evaluation::statistics::PDF Class Reference

Class PDF: Probability Distribution Function. This class can be used to output the distribution function, the complementary distribution function, and the probability function of a given random x-sequence. The user only has to define the left and right border of the x-axis, the given x-values are expected to lie in, and the resolution of this range on the x-axis, i.e. the number of intervals. This algorithm does not consider correlation at all and, thus, cannot be used for controlling the length of a simulation run. This algorithm is especially useful, when you have to examine a fixed set of values or when you want to gain a first notion of the behaviour of a correlated sequence of values.

#include <evaluation/statistics/pdf.hpp>

Inheritance diagram for wns::evaluation::statistics::PDF:

Inheritance graph
[legend]
Collaboration diagram for wns::evaluation::statistics::PDF:

Collaboration graph
[legend]

List of all members.

Public Types

enum  scaleType { logarithmical, linear }
 scale type of the x-axis More...

Public Member Functions

 PDF (const PDF &other)
 Default copy constructor is correct.
 PDF (const wns::pyconfig::View &config)
 PDF (double minXValue, double maxXValue, unsigned long int resolution, scaleType scaleType, formatType format, std::string name, std::string description)
virtual void print (std::ostream &stream=std::cout) const
 Normal output.
virtual void put (double value)
 Input a value to the statistical evaluation.
virtual void reset ()
 Reset evaluation algorithm to its initial state.
virtual ~PDF ()

Private Member Functions

double getAbscissa (unsigned long int index) const
 Calculate the abscissa value for the given index.
unsigned long int getIndex (double value) const
 Calculate the index in the array for the given Value.
double getPercentile (int p) const
void getResult (unsigned long int index, double &abscissa, double &f, double &G, double &P) const
 Return statistical information of the given interval.
void printPercentile (int p, std::ostream &stream=std::cout) const
 Print String representation of p-th percentile into stream.

Private Attributes

std::string desc
double maxXValue_
 Right border of the x-axis.
double minXValue_
 Left border of the x-axis.
std::string name_
 Probe name.
int overFlows_
unsigned long int resolution_
 Resolution of the x-axis.
scaleType scaleType_
int underFlows_
std::vector< intvalues_
 Array containing occurrences of all values.

Classes

class  PercentileError
class  PercentileOverFlow
class  PercentileUnderFlow


Detailed Description

Definition at line 49 of file pdf.hpp.


Member Enumeration Documentation

Enumerator:
logarithmical 
linear 

Definition at line 57 of file pdf.hpp.


Constructor & Destructor Documentation

PDF::PDF ( double  minXValue,
double  maxXValue,
unsigned long int  resolution,
scaleType  scaleType,
formatType  format,
std::string  name,
std::string  description 
)

Definition at line 42 of file pdf.cpp.

PDF::PDF ( const wns::pyconfig::View config  ) 

Definition at line 63 of file pdf.cpp.

PDF::PDF ( const PDF other  ) 

Definition at line 81 of file pdf.cpp.

PDF::~PDF (  )  [virtual]

Definition at line 101 of file pdf.cpp.


Member Function Documentation

double PDF::getAbscissa ( unsigned long int  index  )  const [private]

Definition at line 312 of file pdf.cpp.

unsigned long int PDF::getIndex ( double  value  )  const [private]

Definition at line 280 of file pdf.cpp.

double PDF::getPercentile ( int  p  )  const [private]

Get the (approximated) p-th percentile, throws a PercentileError if not possible

Definition at line 333 of file pdf.cpp.

void PDF::getResult ( unsigned long int  index,
double abscissa,
double f,
double G,
double P 
) const [private]

Definition at line 406 of file pdf.cpp.

void PDF::print ( std::ostream &  stream = std::cout  )  const [virtual]

Reimplemented from wns::evaluation::statistics::StatEval.

Definition at line 106 of file pdf.cpp.

void PDF::printPercentile ( int  p,
std::ostream &  stream = std::cout 
) const [private]

Definition at line 380 of file pdf.cpp.

void PDF::put ( double  value  )  [virtual]

Reimplemented from wns::evaluation::statistics::StatEval.

Definition at line 256 of file pdf.cpp.

void PDF::reset (  )  [virtual]

Reimplemented from wns::evaluation::statistics::StatEval.

Definition at line 305 of file pdf.cpp.


Member Data Documentation

Probe description

Definition at line 178 of file pdf.hpp.

Definition at line 149 of file pdf.hpp.

Definition at line 144 of file pdf.hpp.

Reimplemented from wns::evaluation::statistics::StatEval.

Definition at line 173 of file pdf.hpp.

Definition at line 168 of file pdf.hpp.

Definition at line 154 of file pdf.hpp.

Scale of the x-axis

Definition at line 159 of file pdf.hpp.

Definition at line 166 of file pdf.hpp.

Definition at line 164 of file pdf.hpp.


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

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