Go to the previous, next section.
#include <nihcl/Random.h>
Class
Random
provides a pseudo-random number generator. The member function
next()
returns random
float
numbers uniformly distributed over the interval (0.0,1.0).
Reference:
Pierre L'ecuyer, "Efficient and Portable Combined Random Number Generators", Commun. ACM 31, 6 (June 1988), 742-749.
Random()
Random
with
seed1
= seconds elapsed since 00:00:00 GMT, Jan. 1, 1970, and
seed2
= the address of this instance.
Random(long
seed1, long
seed2)
Random
with
seed1
and
seed2
set from the arguments.
float next()
next()
returns random
float
numbers uniformly distributed over the interval (0.0,1.0).
virtual unsigned hash() const
Random
.
virtual bool isEqual(const Object&
ob) const
YES
if this
Random
and
ob
are the same; i.e., reside at the same memory address.
virtual void deepenShallowCopy()
Random
.
virtual void printOn(ostream&
strm
=cout) const
Random
on the output stream
strm.
virtual void storer(OIOofd&
fd) const
virtual void storer(OIOout&
strm) const
Random
on
fd
or
strm.
virtual int compare(const Object&
ob) const
shouldNotImplement()
.
Go to the previous, next section.