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

#include <ImathRandom.h>

Public Member Functions

IMATH_HOSTDEVICE Rand32 (unsigned long int seed=0)
 Constructor, given a seed. 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 unsigned long int nexti ()
 Get the next value in the sequence (range: [0 ... 0xffffffff]) More...
 
IMATH_HOSTDEVICE float nextf ()
 Get the next value in the sequence (range: [0 ... 1[) More...
 
IMATH_HOSTDEVICE float nextf (float rangeMin, float rangeMax)
 Get the next value in the sequence (range [rangeMin ... rangeMax[) More...
 

Detailed Description

Fast random-number generator that generates a uniformly distributed sequence with a period length of 2^32.

Definition at line 32 of file ImathRandom.h.

Constructor & Destructor Documentation

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

Constructor, given a seed.

Definition at line 128 of file ImathRandom.h.

Member Function Documentation

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

Re-initialize with a given seed.

Definition at line 123 of file ImathRandom.h.

IMATH_HOSTDEVICE bool Rand32::nextb ( )
inline

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

Definition at line 140 of file ImathRandom.h.

IMATH_HOSTDEVICE float Rand32::nextf ( )

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

IMATH_HOSTDEVICE float Rand32::nextf ( float  rangeMin,
float  rangeMax 
)
inline

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

Definition at line 155 of file ImathRandom.h.

IMATH_HOSTDEVICE unsigned long int Rand32::nexti ( )
inline

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

Definition at line 148 of file ImathRandom.h.


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