lot.cpp File Reference

Random number generators. More...

#include <cfloat>
#include <ctime>
#include <iostream>
#include <boost/static_assert.hpp>
#include "mcmc++/lot.h"

Include dependency graph for lot.cpp:

Go to the source code of this file.

Namespaces

namespace  lot_conditions

Defines

#define unif_rand()   uniform()
#define exp_rand()   expon()
#define norm_rand()   snorm()
#define repeat   for (;;)
#define expmax   log(DBL_MAX)


Detailed Description

Random number generators.

A series of random number generators are provided here. Any one of three uniform random number generators can be chosen. By default the Mersenne twister is used.

Author:
Kent Holsinger & Paul Lewis
Date:
2005-05-18
The random number generators from R have been checked for numerical accuracy with the routines in R v2.0. See lotTest.cpp for the specific small set of test run. In every case the results differ from those reported by R by less than 1.0e-11, and are exact for integer random variables.

Definition in file lot.cpp.


Define Documentation

 
#define exp_rand (  )     expon()

Macro for compatibility with RNGs from R

Definition at line 62 of file lot.cpp.

Referenced by lot::gamma(), lot::geom(), and lot::poisson().

 
#define norm_rand (  )     snorm()

Macro for compatibility with RNGs from R

Definition at line 65 of file lot.cpp.

Referenced by lot::gamma(), lot::poisson(), and lot::t().

#define repeat   for (;;)

Macro for compatibility with RNGs from R

Definition at line 68 of file lot.cpp.

Referenced by lot::binom(), lot::gamma(), lot::poisson(), and lot::snorm().

 
#define unif_rand (  )     uniform()

Macro for compatibility with RNGs from R

Definition at line 59 of file lot.cpp.

Referenced by lot::beta(), lot::binom(), lot::cauchy(), lot::gamma(), lot::hypergeom(), lot::poisson(), lot::snorm(), and lot::weibull().


Generated on Tue Mar 27 16:03:44 2007 for mcmc by  doxygen 1.5.1