NormalRng Class Reference

#include <NormalRng.h>

Inheritance diagram for NormalRng:
Inheritance graph
[legend]
Collaboration diagram for NormalRng:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NormalRng ()
virtual ~NormalRng ()
void setMean (double mean)
void setVariance (double variance)
void setMethod (int method)
int getMethod () const
virtual void vReinit (const Eref &e, ProcPtr p)

Static Public Member Functions

static const CinfoinitCinfo ()

Detailed Description

This is MOOSE wrapper for normally distributed random number generator class, Normal. The default


Constructor & Destructor Documentation

NormalRng::NormalRng (  ) 

By default the method used for normal distribution is alias method by Ahrens and Dieter. In order to use some method other than the default Alias method, one should call setMethod with a proper method index before calling reset ( reinit ). Since different methods create different random sequences, the combined sequence may not have the intended distribution. By default mean and variance are set to 0.0 and 1.0 respectively.

References RandGenerator::rng_.

virtual NormalRng::~NormalRng (  )  [inline, virtual]

Member Function Documentation

int NormalRng::getMethod ( void   )  const

Returns the algorithm used. 0 for alias method. 1 for BoxMueller method.

References Normal::getMethod(), and RandGenerator::rng_.

Referenced by initCinfo().

Here is the call graph for this function:

const Cinfo * NormalRng::initCinfo (  )  [static]

Reimplemented from RandGenerator.

References RandGenerator::getMean(), getMethod(), RandGenerator::getVariance(), RandGenerator::initCinfo(), setMean(), setMethod(), and setVariance().

Here is the call graph for this function:

void NormalRng::setMean ( double  mean  ) 

Set the mean of the internal generator object.

References RandGenerator::rng_, and Normal::setMean().

Referenced by initCinfo().

Here is the call graph for this function:

void NormalRng::setMethod ( int  method  ) 

Set the algorithm to be used. 1 for BoxMueller method. Anything else for alias method.

References Normal::getMethod(), RandGenerator::rng_, and Normal::setMethod().

Referenced by initCinfo().

Here is the call graph for this function:

void NormalRng::setVariance ( double  variance  ) 

Since normal distribution is defined in terms of mean and variance, we want to store them in order to create the internal generator object.

References RandGenerator::rng_, and Normal::setVariance().

Referenced by initCinfo().

Here is the call graph for this function:

void NormalRng::vReinit ( const Eref e,
ProcPtr  p 
) [virtual]

Reimplemented from RandGenerator.


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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1