HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Rand48 Class Reference

#include <ImathRandom.h>

Public Member Functions

IMATH_HOSTDEVICE Rand48 (unsigned long int seed=0)
 Constructor. More...
 
IMATH_HOSTDEVICE void init (unsigned long int seed)
 Re-initialize with a given seed. More...
 
IMATH_HOSTDEVICE bool nextb ()
 Get the next value in the sequence (range: [false, true]) More...
 
IMATH_HOSTDEVICE long int nexti ()
 Get the next value in the sequence (range: [0 ... 0x7fffffff]) More...
 
IMATH_HOSTDEVICE double nextf ()
 Get the next value in the sequence (range: [0 ... 1[) More...
 
IMATH_HOSTDEVICE double nextf (double rangeMin, double rangeMax)
 Get the next value in the sequence (range [rangeMin ... rangeMax[) More...
 

Detailed Description

Random-number generator based on the C Standard Library functions erand48(), nrand48() & company; generates a uniformly distributed sequence.

Definition at line 63 of file ImathRandom.h.

Constructor & Destructor Documentation

IMATH_HOSTDEVICE Rand48::Rand48 ( unsigned long int  seed = 0)
inline

Constructor.

Definition at line 171 of file ImathRandom.h.

Member Function Documentation

IMATH_HOSTDEVICE void Rand48::init ( unsigned long int  seed)
inline

Re-initialize with a given seed.

Definition at line 162 of file ImathRandom.h.

IMATH_HOSTDEVICE bool Rand48::nextb ( )
inline

Get the next value in the sequence (range: [false, true])

Definition at line 177 of file ImathRandom.h.

IMATH_HOSTDEVICE double Rand48::nextf ( )
inline

Get the next value in the sequence (range: [0 ... 1[)

Definition at line 189 of file ImathRandom.h.

IMATH_HOSTDEVICE double Rand48::nextf ( double  rangeMin,
double  rangeMax 
)
inline

Get the next value in the sequence (range [rangeMin ... rangeMax[)

Definition at line 195 of file ImathRandom.h.

IMATH_HOSTDEVICE long int Rand48::nexti ( )
inline

Get the next value in the sequence (range: [0 ... 0x7fffffff])

Definition at line 183 of file ImathRandom.h.


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