IT++ Logo Newcom Logo

itpp::Normal_RNG Class Reference
[Random Number Generation]

Normal distribution. More...

#include <itpp/base/random.h>

List of all members.

Public Member Functions

 Normal_RNG (double meanval, double variance)
 Constructor. Set mean and variance.
 Normal_RNG ()
 Constructor. Set mean and variance.
void setup (double meanval, double variance)
 Set mean, and variance.
void get_setup (double &meanval, double &variance) const
 Get mean and variance.
double operator() ()
 Get one sample.
vec operator() (int n)
 Get a sample vector.
mat operator() (int h, int w)
 Get a sample matrix.
double sample ()
 Get a Normal distributed (0,1) sample.
void sample_vector (int size, vec &out)
 Get a Normal distributed (0,1) vector.
void sample_matrix (int rows, int cols, mat &out)
 Get a Normal distributed (0,1) matrix.


Detailed Description

Normal distribution.

Definition at line 404 of file random.h.


Constructor & Destructor Documentation

itpp::Normal_RNG::Normal_RNG ( double  meanval,
double  variance 
) [inline]

Constructor. Set mean and variance.

Definition at line 407 of file random.h.

References setup().

itpp::Normal_RNG::Normal_RNG (  )  [inline]

Constructor. Set mean and variance.

Definition at line 409 of file random.h.


Member Function Documentation

void itpp::Normal_RNG::setup ( double  meanval,
double  variance 
) [inline]

Set mean, and variance.

Definition at line 411 of file random.h.

References itpp::sqrt().

Referenced by Normal_RNG().

void itpp::Normal_RNG::get_setup ( double &  meanval,
double &  variance 
) const

Get mean and variance.

Definition at line 255 of file random.cpp.

double itpp::Normal_RNG::operator() (  )  [inline]

Get one sample.

Definition at line 416 of file random.h.

References sample().

vec itpp::Normal_RNG::operator() ( int  n  )  [inline]

Get a sample vector.

Definition at line 418 of file random.h.

References sample_vector().

mat itpp::Normal_RNG::operator() ( int  h,
int  w 
) [inline]

Get a sample matrix.

Definition at line 420 of file random.h.

References sample_matrix().

double itpp::Normal_RNG::sample (  )  [inline]

Get a Normal distributed (0,1) sample.

Definition at line 422 of file random.h.

References itpp::log(), itpp::Random_Generator::random_01(), and itpp::sqrt().

Referenced by operator()(), itpp::randn(), sample_matrix(), and sample_vector().

void itpp::Normal_RNG::sample_vector ( int  size,
vec &  out 
) [inline]

Get a Normal distributed (0,1) vector.

Definition at line 435 of file random.h.

References sample().

Referenced by operator()(), and itpp::randn().

void itpp::Normal_RNG::sample_matrix ( int  rows,
int  cols,
mat &  out 
) [inline]

Get a Normal distributed (0,1) matrix.

Definition at line 442 of file random.h.

References sample().

Referenced by operator()(), and itpp::randn().


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

Generated on Fri Jun 8 00:37:37 2007 for IT++ by Doxygen 1.5.2