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

A class that generates a normal (gaussian) probability distribution for 32-bit floats. More...

#include <omNormalDistribution.h>

Public Member Functions

 NormalDistribution ()
 Create a standard normal distribution with mean of 0 and standard deviation 1. More...
 
 NormalDistribution (const Random< float > &newRandom)
 Create a standard normal distribution with mean of 0 and standard deviation 1. More...
 
 NormalDistribution (float newMean, float newStandardDeviation)
 Create a normal distribution with the specified mean and standard deviation. More...
 
 NormalDistribution (float newMean, float newStandardDeviation, const Random< float > &newRandom)
 Create a normal distribution with the specified mean and standard deviation. More...
 
float sample ()
 Generate a sample from the normal distribution. More...
 
float getMean () const
 Get the mean of the normal distribution. More...
 
void setMean (float newMean)
 Set the mean of the normal distribution. More...
 
float getStandardDeviation () const
 Get the standard deviation of the normal distribution. More...
 
void setStandardDeviation (float newStandardDeviation)
 Set the standard deviation of the normal 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 setRandom (const Random< float > &newRandom)
 Set the random variable used to generate samples for this distribution. More...
 

Detailed Description

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

A class that generates a normal (gaussian) probability distribution for 32-bit floats.

Constructor & Destructor Documentation

Create a standard normal distribution with mean of 0 and standard deviation 1.

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

Create a standard normal distribution with mean of 0 and standard deviation 1.

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

om::math::NormalDistribution< float >::NormalDistribution ( float  newMean,
float  newStandardDeviation 
)
inline

Create a normal distribution with the specified mean and standard deviation.

om::math::NormalDistribution< float >::NormalDistribution ( float  newMean,
float  newStandardDeviation,
const Random< float > &  newRandom 
)
inline

Create a normal distribution with the specified mean and standard deviation.

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

Member Function Documentation

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

Generate a sample from the normal distribution.

float om::math::NormalDistribution< float >::getMean ( ) const
inline

Get the mean of the normal distribution.

void om::math::NormalDistribution< float >::setMean ( float  newMean)
inline

Set the mean of the normal distribution.

float om::math::NormalDistribution< float >::getStandardDeviation ( ) const
inline

Get the standard deviation of the normal distribution.

void om::math::NormalDistribution< float >::setStandardDeviation ( float  newStandardDeviation)
inline

Set the standard deviation of the normal distribution.

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

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

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

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

void om::math::NormalDistribution< float >::setRandom ( 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: