regal::plaws::DiscreteProbabilityLaw Class Reference

#include <DiscreteProbabilityLaw.hpp>

Inheritance diagram for regal::plaws::DiscreteProbabilityLaw:

regal::plaws::BernouilliLaw regal::plaws::GeometricalLaw regal::plaws::LogarithmicLaw regal::plaws::NonZeroPoissonLaw regal::plaws::PoissonLaw regal::plaws::UniformLaw List of all members.

Public Member Functions

 DiscreteProbabilityLaw (const double &param)
int randomValue ()
virtual ~DiscreteProbabilityLaw ()

Protected Member Functions

virtual int initCounter ()
virtual double initProbability ()=0
virtual void updateProbability (const int &k)=0

Protected Attributes

double p
double x

Constructor & Destructor Documentation

regal::plaws::DiscreteProbabilityLaw::DiscreteProbabilityLaw ( const double &  param  )  [inline]

Creates a Discrete Probability Law

Parameters:
x depends on the probability law

virtual regal::plaws::DiscreteProbabilityLaw::~DiscreteProbabilityLaw (  )  [inline, virtual]

Destroy a Discrete Probability Law


Member Function Documentation

virtual int regal::plaws::DiscreteProbabilityLaw::initCounter (  )  [inline, protected, virtual]

Determines the minimum integer that can be returned

Returns:
the minimum integer that can be returned

virtual double regal::plaws::DiscreteProbabilityLaw::initProbability (  )  [protected, pure virtual]

Determines the probability for the minimum integer to be generated

Returns:
the probability for the minimum integer to be generated

int regal::plaws::DiscreteProbabilityLaw::randomValue (  )  [inline]

Returns a random generated value, according to a given probability law

Returns:
a random generated value

virtual void regal::plaws::DiscreteProbabilityLaw::updateProbability ( const int &  k  )  [protected, pure virtual]

Determines the probability for the next integer to be generated

Returns:
the probability for the next integer to be generated


Member Data Documentation

double regal::plaws::DiscreteProbabilityLaw::p [protected]

double regal::plaws::DiscreteProbabilityLaw::x [protected]


The documentation for this class was generated from the following file:
Generated on Mon Sep 29 16:33:59 2008 for REGAL by  doxygen 1.5.1