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

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

Detailed Description

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

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

Constructor & Destructor Documentation

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

om::math::NormalDistribution< double >::NormalDistribution ( const Random< double > &  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< double >::NormalDistribution ( double  newMean,
double  newStandardDeviation 
)
inline

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

om::math::NormalDistribution< double >::NormalDistribution ( double  newMean,
double  newStandardDeviation,
const Random< double > &  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

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

Generate a sample from the normal distribution.

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

Get the mean of the normal distribution.

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

Set the mean of the normal distribution.

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

Get the standard deviation of the normal distribution.

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

Set the standard deviation of the normal distribution.

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

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

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

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

void om::math::NormalDistribution< double >::getRandom ( const Random< double > &  newRandom)
inline

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


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