Collaboration diagram for Minimal Standard Random Numbers:
![]() |
Files | |
file | msr.c |
Minimal Standard RANdom number generator. | |
Data Structures | |
struct | bn_unif |
struct | bn_gauss |
Defines | |
#define | BN_UNIF_MAGIC 12481632 |
#define | BN_GAUSS_MAGIC 512256128 |
#define | BN_CK_UNIF(_p) BU_CKMAG(_p, BN_UNIF_MAGIC, "bn_unif") |
#define | BN_CK_GAUSS(_p) BU_CKMAG(_p, BN_GAUSS_MAGIC, "bn_gauss") |
#define | BN_UNIF_LONG(_p) |
#define | BN_UNIF_DOUBLE(_p) |
#define | BN_UNIF_CIRCLE(_p, _x, _y, _r) |
#define | BN_UNIF_SPHERE(_p, _x, _y, _z, _r) |
#define | BN_GAUSS_DOUBLE(_p) |
#define | BN_MSR_MAXTBL 4096 |
#define | A 16807 |
#define | M 2147483647 |
#define | DM 2147483647.0 |
#define | Q 127773 |
#define | R 2836 |
Functions | |
bn_unif * | bn_unif_init (long setseed, int method) |
void | bn_unif_free (struct bn_unif *p) |
long | bn_unif_long_fill (struct bn_unif *p) |
double | bn_unif_double_fill (struct bn_unif *p) |
bn_gauss * | bn_gauss_init (long setseed, int method) |
void | bn_gauss_free (struct bn_gauss *p) |
double | bn_gauss_fill (struct bn_gauss *p) |
bn_unif * | bn_unif_init (long int setseed, int method) |
bn_gauss * | bn_gauss_init (long int setseed, int method) |
|
Definition at line 562 of file bn.h. Referenced by bn_unif_double_fill(), bn_unif_init(), bn_unif_long_fill(), and bu_identify_magic(). |
|
Definition at line 563 of file bn.h. Referenced by bn_gauss_init(), bn_unif_double_fill(), bn_unif_long_fill(), and bu_identify_magic(). |
|
Definition at line 565 of file bn.h. Referenced by bn_unif_double_fill(), and bn_unif_long_fill(). |
|
Definition at line 566 of file bn.h. Referenced by bn_gauss_fill(). |
|
Value: (((_p)->msr_long_ptr ) ? \ (_p)->msr_longs[--(_p)->msr_long_ptr] : \ bn_unif_long_fill(_p)) |
|
Value: (((_p)->msr_double_ptr) ? \ (_p)->msr_doubles[--(_p)->msr_double_ptr] : \ bn_unif_double_fill(_p)) |
|
Value: { \ do { \ (_x) = 2.0*BN_UNIF_DOUBLE((_p)); \ (_y) = 2.0*BN_UNIF_DOUBLE((_p)); \ (_r) = (_x)*(_x)+(_y)*(_y); \ } while ((_r) >= 1.0); } Definition at line 610 of file bn.h. Referenced by bn_gauss_fill(). |
|
Value: { \ do { \ (_x) = 2.0*BN_UNIF_DOUBLE(_p); \ (_y) = 2.0*BN_UNIF_DOUBLE(_p); \ (_z) = 2.0*BN_UNIF_DOUBLE(_p); \ (_r) = (_x)*(_x)+(_y)*(_y)+(_z)*(_z);\ } while ((_r) >= 1.0) } |
|
Value: (((_p)->msr_gauss_ptr) ? \ (_p)->msr_gausses[--(_p)->msr_gauss_ptr] : \ bn_gauss_fill(_p)) |
|
Note: BN_MSR_MAXTBL must be an even number. Definition at line 61 of file msr.c. Referenced by bn_gauss_fill(), bn_gauss_init(), bn_unif_double_fill(), bn_unif_init(), and bn_unif_long_fill(). |
|
Definition at line 89 of file msr.c. Referenced by bend_pipe_shot(), bn_mat_ck(), bn_mat_fromto(), bn_poly_cubic_roots(), bn_unif_double_fill(), bn_unif_long_fill(), db_non_union_push(), do_intersect(), do_subtract(), do_union(), eval_etree(), eval_op(), rt_ehy_plot(), rt_ehy_tess(), rt_epa_plot(), rt_epa_tess(), rt_mk_hyperbola(), rt_tgc_tess(), rt_tor_shot(), and rt_tor_vshot(). |
|
Definition at line 90 of file msr.c. Referenced by bn_mat_fromto(), bn_unif_double_fill(), bn_unif_long_fill(), db_functree(), rt_comb_export4(), rt_nurb_curvature(), and rt_tgc_curve(). |
|
Definition at line 91 of file msr.c. Referenced by bn_unif_double_fill(). |
|
Definition at line 92 of file msr.c. Referenced by bn_mat_fromto(), bn_unif_double_fill(), and bn_unif_long_fill(). |
|
|
|
|
Definition at line 239 of file msr.c. References bu_free(), bn_unif::magic, bn_unif::msr_doubles, and bn_unif::msr_longs. Here is the call graph for this function: ![]() |
|
Definition at line 139 of file msr.c. References A, BN_CK_UNIF, BN_GAUSS_MAGIC, BN_MSR_MAXTBL, BN_UNIF_MAGIC, M, bn_unif::magic, bn_unif::msr_long_ptr, bn_unif::msr_longs, bn_unif::msr_seed, Q, and R. |
|
Definition at line 201 of file msr.c. References A, BN_CK_UNIF, BN_GAUSS_MAGIC, BN_MSR_MAXTBL, BN_UNIF_MAGIC, DM, M, bn_unif::magic, bn_unif::msr_double_ptr, bn_unif::msr_doubles, bn_unif::msr_seed, Q, and R. |
|
|
|
Definition at line 348 of file msr.c. References bu_free(), bn_gauss::msr_gauss_doubles, and bn_gauss::msr_gausses. Here is the call graph for this function: ![]() |
|
Definition at line 320 of file msr.c. References BN_CK_GAUSS, BN_MSR_MAXTBL, BN_UNIF_CIRCLE, bn_gauss::msr_gauss_ptr, and bn_gauss::msr_gausses. |
|
Definition at line 95 of file msr.c. References BN_MSR_MAXTBL, BN_UNIF_MAGIC, bu_malloc(), bn_unif::magic, bn_unif::msr_double_ptr, bn_unif::msr_doubles, bn_unif::msr_long_ptr, bn_unif::msr_longs, and bn_unif::msr_seed. Here is the call graph for this function: ![]() |
|
Definition at line 273 of file msr.c. References BN_GAUSS_MAGIC, BN_MSR_MAXTBL, bu_malloc(), bn_gauss::magic, bn_gauss::msr_gauss_dbl_ptr, bn_gauss::msr_gauss_doubles, bn_gauss::msr_gauss_ptr, bn_gauss::msr_gauss_seed, and bn_gauss::msr_gausses. Here is the call graph for this function: ![]() |