Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::math::ExponentialDistribution< float > Class Template Reference

A class that generates an exponential probability distribution for 32-bit floats. More...

#include <omExponentialDistribution.h>

Public Member Functions

 ExponentialDistribution ()
 Create an exponential distribution with lambda equal to 1. More...
 
 ExponentialDistribution (const Random< float > &newRandom)
 Create an exponential distribution with lambda equal to 1. More...
 
 ExponentialDistribution (float newLambda)
 Create an exponential distribution with lambda equal to the specified value. More...
 
 ExponentialDistribution (float newLambda, const Random< float > &newRandom)
 Create an exponential distribution with lambda equal to the specified value. More...
 
float sample ()
 Generate a sample from the exponential distribution. More...
 
float getLambda () const
 Get the lambda parameter of this exponential distribution. More...
 
void setLambda (float newLambda)
 Set the lambda parameter of this exponential distribution. More...
 
Random< float > & getRandom ()
 Get the random variable used to generate samples for this distribution. More...
 
const Random< float > & getRandom () const
 Get the random variable used to generate samples for this distribution. More...
 
void getRandom (const Random< float > &newRandom)
 Set the random variable used to generate samples for this distribution. More...
 

Detailed Description

template<>
class om::math::ExponentialDistribution< float >

A class that generates an exponential probability distribution for 32-bit floats.

Constructor & Destructor Documentation

Create an exponential distribution with lambda equal to 1.

om::math::ExponentialDistribution< float >::ExponentialDistribution ( const Random< float > &  newRandom)
inline

Create an exponential distribution with lambda equal to 1.

The created exponential distribution will produce samples using the specified random variable.

om::math::ExponentialDistribution< float >::ExponentialDistribution ( float  newLambda)
inline

Create an exponential distribution with lambda equal to the specified value.

om::math::ExponentialDistribution< float >::ExponentialDistribution ( float  newLambda,
const Random< float > &  newRandom 
)
inline

Create an exponential distribution with lambda equal to the specified value.

The created exponential distribution will produce samples using the specified random variable.

Member Function Documentation

float om::math::ExponentialDistribution< float >::sample ( )
inline

Generate a sample from the exponential distribution.

float om::math::ExponentialDistribution< float >::getLambda ( ) const
inline

Get the lambda parameter of this exponential distribution.

void om::math::ExponentialDistribution< float >::setLambda ( float  newLambda)
inline

Set the lambda parameter of this exponential distribution.

Random<float>& om::math::ExponentialDistribution< float >::getRandom ( )
inline

Get the random variable used to generate samples for this distribution.

const Random<float>& om::math::ExponentialDistribution< float >::getRandom ( ) const
inline

Get the random variable used to generate samples for this distribution.

void om::math::ExponentialDistribution< float >::getRandom ( const Random< float > &  newRandom)
inline

Set the random variable used to generate samples for this distribution.


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