BRL-CAD
(Pseudo) Random Numbers

Routines for generating series of pseudo-random or quasi-random numbers. More...

Collaboration diagram for (Pseudo) Random Numbers:

Modules

 Minimal Standard Random Numbers
 Minimal Standard RANdom number generator.
 
 Mersenne Twister
 Mersenne Twister random number generation as defined by MT19937.
 
 Random Number Tables
 A supply of fast pseudo-random numbers from table in bn/rand.c. The values are in the open interval (i.e. exclusive) of 0.0 to 1.0 range with a period of 4096.
 
 Sobol quasi-random low-discrepancy sequences of numbers
 Generation of the Sobol quasi-random low-discrepancy sequence of numbers.
 

Files

file  numgen.h
 

Typedefs

typedef struct bn_num_s * bn_numgen
 

Functions

void bn_sph_pnts (point_t *pnts, size_t cnt, bn_numgen n)
 Generate points on a unit sphere per Marsaglia (1972): https://projecteuclid.org/euclid.aoms/1177692644. More...
 

Detailed Description

Routines for generating series of pseudo-random or quasi-random numbers.

LIBBN support for pseudo-random number generation.

Typedef Documentation

◆ bn_numgen

typedef struct bn_num_s* bn_numgen

The following container holds all state associated with a particular number generator. The details of that state are specific to the type of selected generator and are not public, but the container allows libbn to avoid using globals to maintain state - instead, each "generator" instance has its own state.

Definition at line 51 of file numgen.h.

Function Documentation

◆ bn_sph_pnts()

void bn_sph_pnts ( point_t pnts,
size_t  cnt,
bn_numgen  n 
)

Generate points on a unit sphere per Marsaglia (1972): https://projecteuclid.org/euclid.aoms/1177692644.

The user is responsible for selecting the numerical generator used to supply pseudo or quasi-random numbers to bg_sph_sample - different types of inputs may be needed depending on the application.