Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.5new_solver
      Class Index
      File List
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

Random number generator for N dimensions. More...

#include <random.hpp>

Inheritance diagram for Random:
MTRandom QRandom

Public Member Functions

 Random (size_t N)
 Constructor for N dimensional RNG. More...
 
virtual ~Random ()
 Destructor. More...
 
void set_transformation (size_t i, const Random_Variate_Transformation &trans)
 Set random variate transformation for dimension i. More...
 
virtual void get (double *x) const =0
 Get a set of random numbers. More...
 

Protected Attributes

pthread_mutex_t _mutex
 
std::vector
< Random_Variate_Transformation * > 
_transformation
 

Detailed Description

Random number generator for N dimensions.

This random number generator can produce random numbers in N independent dimensions. The RNG defaults to return uniformly distributed numbers between 0 and 1. Other distributions can be sampled by setting transformations. The transformations can be set independently for each dimension.

Random number generators should be mutex protected.

Constructor & Destructor Documentation

Random::Random ( size_t  N)

Constructor for N dimensional RNG.

Random::~Random ( )
virtual

Destructor.

Member Function Documentation

virtual void Random::get ( double *  x) const
pure virtual

Get a set of random numbers.

Get next sampling from random number generator to array x. The array x must have space for N numbers.

Implemented in MTRandom, and QRandom.

void Random::set_transformation ( size_t  i,
const Random_Variate_Transformation trans 
)

Set random variate transformation for dimension i.

All transformations default to Uniform_Transformation.


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


Reference manual for Ion Beam Simulator 1.0.5new_solver
Generated by Doxygen 1.8.5 on Tue May 19 2015 09:15:44.