109 namespace librandom {
161 virtual long ldev(
void);
202 return (*
this)(
rng_);
227 template <
typename DevType>
235 return RdvPtr(
new DevType());
241 return RdvPtr(
new DevType(rng));
RandomDev(RngPtr rng=RngPtr(0))
Construct with (single-threaded) or without (multithreaded) RNG.
Definition: randomdev.h:139
virtual bool has_ldev() const
true if RDG implements ldev function
Definition: randomdev.h:167
virtual double operator()(void)
Operator delivering doubles.
Definition: randomdev.h:199
RngPtr rng_
store underlying RNG
Definition: randomdev.h:195
bool valid(void) const
< returns true if and only if obj->pointee != NULL
Definition: lockptr.h:307
lockPTR< RandomGen > RngPtr
Common lock-pointer type for RNG.
Definition: randomgen.h:208
virtual ~GenericRandomDevFactory()
Definition: randomdev.h:218
virtual ~RandomDev()
ensure proper clean-up
Definition: randomdev.h:142
void set_rng(RngPtr rng)
set RNG
Definition: randomdev.h:170
RdvPtr create() const
create unbound deviate generator
Definition: randomdev.h:233
Abstract base class for access to non-uniform random deviate generators.
Definition: randomdev.h:131
lockPTR< RandomDev > RdvPtr
Common lock-pointer type for Random deviate generators.
Definition: randomdev.h:111
RdvPtr create(RngPtr rng) const
create deviate generator given uniform number generator
Definition: randomdev.h:239
Generic factory class for RandomDev.
Definition: randomdev.h:216
virtual void set_status(const DictionaryDatum &)=0
set distribution parameters from SLI interface
virtual long ldev(void)
integer valued functions for discrete distributions
Definition: randomdev.h:206
virtual RdvPtr create() const =0
virtual void get_status(DictionaryDatum &) const =0
get distribution parameters from SLI interface
Factory class for generating objects of type RandomDev.
Definition: randomdev.h:228