NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Protected Attributes | List of all members
librandom::RandomDev Class Referenceabstract

Abstract base class for access to non-uniform random deviate generators. More...

#include <randomdev.h>

Inheritance diagram for librandom::RandomDev:
librandom::BinomialRandomDev librandom::ExpRandomDev librandom::GammaRandomDev librandom::GSL_BinomialRandomDev librandom::LognormalRandomDev librandom::NormalRandomDev librandom::PoissonRandomDev librandom::UniformIntRandomDev librandom::UniformRandomDev

Public Member Functions

 RandomDev (RngPtr rng=RngPtr(0))
 Construct with (single-threaded) or without (multithreaded) RNG. More...
 
virtual ~RandomDev ()
 ensure proper clean-up More...
 
virtual double operator() (void)
 Operator delivering doubles. More...
 
virtual double operator() (RngPtr) const =0
 multi-threaded More...
 
virtual long ldev (void)
 integer valued functions for discrete distributions More...
 
virtual long ldev (RngPtr) const
 
virtual bool has_ldev () const
 true if RDG implements ldev function More...
 
void set_rng (RngPtr rng)
 set RNG More...
 
virtual void set_status (const DictionaryDatum &)=0
 set distribution parameters from SLI interface More...
 
virtual void get_status (DictionaryDatum &) const =0
 get distribution parameters from SLI interface More...
 

Protected Attributes

RngPtr rng_
 store underlying RNG More...
 

Detailed Description

Abstract base class for access to non-uniform random deviate generators.

See also
RandomGen

HEP 2002-07-09, 2004-06-28

Constructor & Destructor Documentation

librandom::RandomDev::RandomDev ( RngPtr  rng = RngPtr(0))
inline

Construct with (single-threaded) or without (multithreaded) RNG.

virtual librandom::RandomDev::~RandomDev ( )
inlinevirtual

ensure proper clean-up

Member Function Documentation

virtual void librandom::RandomDev::get_status ( DictionaryDatum ) const
pure virtual

get distribution parameters from SLI interface

Note
RDGs with parameters will usually implement functions to manipulate the parameters directly, without use of a SLI dictionary. This function is meant only to provide access from the SLI interface.

Implemented in librandom::BinomialRandomDev, librandom::PoissonRandomDev, librandom::GSL_BinomialRandomDev, librandom::GammaRandomDev, librandom::UniformIntRandomDev, librandom::UniformRandomDev, librandom::LognormalRandomDev, librandom::NormalRandomDev, and librandom::ExpRandomDev.

virtual bool librandom::RandomDev::has_ldev ( ) const
inlinevirtual
long librandom::RandomDev::ldev ( void  )
inlinevirtual
long librandom::RandomDev::ldev ( RngPtr  ) const
virtual
double librandom::RandomDev::operator() ( void  )
inlinevirtual

Operator delivering doubles.

All random deviates must deliver doubles

Note
Operator varieties with and without RngPtr as argument are implemented explicitly instead of via default value of the argument to force all derived classes to implement both varieties.single-threaded

References assert(), rng_, and lockPTR< D >::valid().

virtual double librandom::RandomDev::operator() ( RngPtr  ) const
pure virtual
void librandom::RandomDev::set_rng ( RngPtr  rng)
inline

set RNG

References rng_.

virtual void librandom::RandomDev::set_status ( const DictionaryDatum )
pure virtual

set distribution parameters from SLI interface

Note
RDGs with parameters will usually implement functions to manipulate the parameters directly, without use of a SLI dictionary. This function is meant only to provide access from the SLI interface.

Implemented in librandom::BinomialRandomDev, librandom::PoissonRandomDev, librandom::GSL_BinomialRandomDev, librandom::GammaRandomDev, librandom::UniformIntRandomDev, librandom::UniformRandomDev, librandom::LognormalRandomDev, librandom::NormalRandomDev, and librandom::ExpRandomDev.

Member Data Documentation

RngPtr librandom::RandomDev::rng_
protected

store underlying RNG

Referenced by ldev(), operator()(), and set_rng().


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