MCL
A C++ library mirroring some of the most common Matlab functions.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
mcl::RandomGenerator Class Reference

#include <randomop.h>

Public Member Functions

 RandomGenerator ()
 
 RandomGenerator (unsigned int seed)
 
std::vector< RealRandn (const Int size)
 
std::vector< RealRand (const Int size)
 
Real Rand ()
 
Int RandInt (const Int &minimum, const Int &maximum)
 
void SetSeed (unsigned int seed)
 

Static Public Member Functions

static bool Test ()
 

Detailed Description

RandomGenerator class

Constructor & Destructor Documentation

mcl::RandomGenerator::RandomGenerator ( )
mcl::RandomGenerator::RandomGenerator ( unsigned int  seed)

Member Function Documentation

std::vector< Real > mcl::RandomGenerator::Rand ( const Int  size)

Returns a vector containing pseudorandom values drawn from the uniform distribution. Equivalent to Matlab's rand(size,1);

Real mcl::RandomGenerator::Rand ( )
inline

Returns a single pseudorandom value drawn from the uniform distribution. Equivalent to Matlab's rand(1,1);

Int mcl::RandomGenerator::RandInt ( const Int minimum,
const Int maximum 
)

Returns a single pseudorandom integer value, uniformly distributed between the given extrema (which are included).

std::vector< Real > mcl::RandomGenerator::Randn ( const Int  size)

Returns a vector containing pseudorandom values drawn from the standard normal distribution. Equivalent to Matlab's randn(size,1);

void mcl::RandomGenerator::SetSeed ( unsigned int  seed)
inline

Set seed of the for random generator

bool mcl::RandomGenerator::Test ( )
static

Testing


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