Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

simth::DiscreteUniformRng Class Reference

Random generator for discrete uniform distributed variates. More...

#include <phrand.h>

Inheritance diagram for simth::DiscreteUniformRng:

simth::RandomGeneratorGsl simth::RandomGenerator List of all members.

Public Member Functions

 DiscreteUniformRng (size_t K)
virtual ~DiscreteUniformRng ()
virtual double get () const
double get_inl () const
void refresh (size_t K=0)

Detailed Description

Random generator for discrete uniform distributed variates.

This class creates a set of $K$ discrete values, uniformly distributed in the range [0.0, 1.0). The random values are then drawn from this set of discrete values, with all values equal probability (i.e. the PDF of the index distribution is also uniform).


Constructor & Destructor Documentation

simth::DiscreteUniformRng::DiscreteUniformRng size_t  K  ) 
 

Constructor for a discrete distribution with K distinct values in the set of possible values.

virtual simth::DiscreteUniformRng::~DiscreteUniformRng  )  [virtual]
 


Member Function Documentation

virtual double simth::DiscreteUniformRng::get  )  const [virtual]
 

Returns a random variate with the described uniform distribution in the range of [0,1).

Implements simth::RandomGenerator.

double simth::DiscreteUniformRng::get_inl  )  const [inline]
 

Non-virtual inline version of get().

void simth::DiscreteUniformRng::refresh size_t  K = 0  ) 
 

Refreshs the set of discrete values, i.e. dices a new set of them.

Parameters:
K The number of discrete values, i.e. the size of the set. If zero, leaves the size of the set unchanged.


Generated on Mon Apr 24 21:19:20 2006 for simthetic by  doxygen 1.4.1