GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
Go to the source code of this file.
Macros | |
#define | EMANTISSA 9007199254740992.0 /* 53 bit mantissa */ |
#define | EMANTISSA 4294967296.0 /* 32 bit mantissa */ |
#define | ERANDI randi53() /* 53 bits for mantissa */ |
#define | ERANDI randi32() /* 32 bits for mantissa */ |
#define | EXP_SECTION_AREA 0.0039496598225815571993 |
#define | LMASK 0x7fffffffUL /* least significant r bits */ |
#define | MATRIX_A 0x9908b0dfUL /* constant vector a */ |
#define | MIXBITS(u, v) ( ((u) & UMASK) | ((v) & LMASK) ) |
#define | MT_M 397 |
#define | NMANTISSA EMANTISSA |
#define | NMANTISSA 2147483648.0 /* 31 bit mantissa */ |
#define | NOR_SECTION_AREA 0.00492867323399 |
#define | NRANDI randi54() /* 53 bits for mantissa + 1 bit sign */ |
#define | NRANDI randi32() /* 31 bits for mantissa + 1 bit sign */ |
#define | randi32 randmt |
#define | RANDU randu53() |
#define | RANDU randu32() |
#define | TWIST(u, v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) |
#define | UMASK 0x80000000UL /* most significant w-r bits */ |
#define | USE_X86_32 0 |
#define | ZIGGURAT_EXP_INV_R 0.129918765548341586 |
#define | ZIGGURAT_EXP_R 7.69711747013104972 |
#define | ZIGGURAT_NOR_INV_R 0.27366123732975828 |
#define | ZIGGURAT_NOR_R 3.6541528853610088 |
#define | ZIGGURAT_TABLE_SIZE 256 |
#define | ZIGINT uint64_t |
#define | ZIGINT uint32_t |
Functions | |
static void | create_ziggurat_float_tables (void) |
static void | create_ziggurat_tables (void) |
static void | next_state (void) |
void | oct_fill_float_rande (octave_idx_type n, float *p) |
void | oct_fill_float_randn (octave_idx_type n, float *p) |
void | oct_fill_float_randu (octave_idx_type n, float *p) |
void | oct_fill_rande (octave_idx_type n, double *p) |
void | oct_fill_randn (octave_idx_type n, double *p) |
void | oct_fill_randu (octave_idx_type n, double *p) |
float | oct_float_rande (void) |
float | oct_float_randn (void) |
float | oct_float_randu (void) |
void | oct_get_state (uint32_t *save) |
void | oct_init_by_array (uint32_t *init_key, int key_length) |
void | oct_init_by_entropy (void) |
void | oct_init_by_int (uint32_t s) |
double | oct_rande (void) |
double | oct_randn (void) |
double | oct_randu (void) |
void | oct_set_state (uint32_t *save) |
static uint64_t | randi53 (void) |
static uint64_t | randi54 (void) |
static uint32_t | randmt (void) |
static float | randu32 (void) |
static double | randu53 (void) |
Variables | |
static double | fe [256] |
static float | ffe [256] |
static float | ffi [256] |
static double | fi [256] |
static uint32_t | fke [256] |
static uint32_t | fki [256] |
static float | fwe [256] |
static float | fwi [256] |
static int | initf = 0 |
static int | initt = 1 |
static int | inittf = 1 |
static uint64_t | ke [256] |
static uint64_t | ki [256] |
static int | left = 1 |
static uint32_t * | next |
static uint32_t | state [624] |
static double | we [256] |
static double | wi [256] |
#define EMANTISSA 9007199254740992.0 /* 53 bit mantissa */ |
Definition at line 664 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and create_ziggurat_tables().
#define EMANTISSA 4294967296.0 /* 32 bit mantissa */ |
Definition at line 664 of file randmtzig.c.
#define ERANDI randi53() /* 53 bits for mantissa */ |
Definition at line 665 of file randmtzig.c.
Referenced by oct_float_rande(), and oct_rande().
#define ERANDI randi32() /* 32 bits for mantissa */ |
Definition at line 665 of file randmtzig.c.
#define EXP_SECTION_AREA 0.0039496598225815571993 |
Definition at line 433 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and create_ziggurat_tables().
#define LMASK 0x7fffffffUL /* least significant r bits */ |
Definition at line 183 of file randmtzig.c.
Referenced by oct_float_randn().
#define MATRIX_A 0x9908b0dfUL /* constant vector a */ |
Definition at line 181 of file randmtzig.c.
Definition at line 184 of file randmtzig.c.
#define MT_M 397 |
Definition at line 180 of file randmtzig.c.
Referenced by next_state().
#define NMANTISSA EMANTISSA |
Definition at line 666 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and create_ziggurat_tables().
#define NMANTISSA 2147483648.0 /* 31 bit mantissa */ |
Definition at line 666 of file randmtzig.c.
#define NOR_SECTION_AREA 0.00492867323399 |
Definition at line 429 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and create_ziggurat_tables().
#define NRANDI randi54() /* 53 bits for mantissa + 1 bit sign */ |
Definition at line 667 of file randmtzig.c.
Referenced by oct_randn().
#define NRANDI randi32() /* 31 bits for mantissa + 1 bit sign */ |
Definition at line 667 of file randmtzig.c.
#define randi32 randmt |
Definition at line 358 of file randmtzig.c.
Referenced by oct_float_randn(), oct_randn(), randi53(), randi54(), randu32(), and randu53().
#define RANDU randu53() |
Definition at line 668 of file randmtzig.c.
Referenced by oct_float_rande(), oct_float_randn(), oct_rande(), and oct_randn().
#define RANDU randu32() |
Definition at line 668 of file randmtzig.c.
#define TWIST | ( | u, | |
v | |||
) | ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) |
Definition at line 185 of file randmtzig.c.
Referenced by next_state().
#define UMASK 0x80000000UL /* most significant w-r bits */ |
Definition at line 182 of file randmtzig.c.
Referenced by oct_randn().
#define USE_X86_32 0 |
Definition at line 174 of file randmtzig.c.
#define ZIGGURAT_EXP_INV_R 0.129918765548341586 |
Definition at line 432 of file randmtzig.c.
#define ZIGGURAT_EXP_R 7.69711747013104972 |
Definition at line 431 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), create_ziggurat_tables(), oct_float_rande(), and oct_rande().
#define ZIGGURAT_NOR_INV_R 0.27366123732975828 |
Definition at line 428 of file randmtzig.c.
Referenced by oct_float_randn(), and oct_randn().
#define ZIGGURAT_NOR_R 3.6541528853610088 |
Definition at line 427 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), create_ziggurat_tables(), oct_float_randn(), and oct_randn().
#define ZIGGURAT_TABLE_SIZE 256 |
Definition at line 425 of file randmtzig.c.
#define ZIGINT uint64_t |
Definition at line 663 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), create_ziggurat_tables(), oct_float_rande(), and oct_rande().
#define ZIGINT uint32_t |
Definition at line 663 of file randmtzig.c.
|
static |
Definition at line 677 of file randmtzig.c.
References EMANTISSA, EXP_SECTION_AREA, fke, fki, NMANTISSA, NOR_SECTION_AREA, x, ZIGGURAT_EXP_R, ZIGGURAT_NOR_R, and ZIGINT.
Referenced by oct_float_rande(), and oct_float_randn().
|
static |
Definition at line 486 of file randmtzig.c.
References EMANTISSA, EXP_SECTION_AREA, ke, ki, NMANTISSA, NOR_SECTION_AREA, x, ZIGGURAT_EXP_R, ZIGGURAT_NOR_R, and ZIGINT.
Referenced by oct_rande(), and oct_randn().
|
static |
Definition at line 314 of file randmtzig.c.
References MT_M, MT_N, next, oct_init_by_entropy(), state, and TWIST.
Referenced by randmt().
void oct_fill_float_rande | ( | octave_idx_type | n, |
float * | p | ||
) |
Definition at line 865 of file randmtzig.c.
References oct_float_rande().
Referenced by octave_rand::fill().
void oct_fill_float_randn | ( | octave_idx_type | n, |
float * | p | ||
) |
Definition at line 857 of file randmtzig.c.
References oct_float_randn().
Referenced by octave_rand::fill().
void oct_fill_float_randu | ( | octave_idx_type | n, |
float * | p | ||
) |
Definition at line 849 of file randmtzig.c.
References oct_float_randu().
Referenced by octave_rand::fill().
void oct_fill_rande | ( | octave_idx_type | n, |
double * | p | ||
) |
Definition at line 841 of file randmtzig.c.
References oct_rande().
Referenced by octave_rand::fill().
void oct_fill_randn | ( | octave_idx_type | n, |
double * | p | ||
) |
Definition at line 833 of file randmtzig.c.
References oct_randn().
Referenced by octave_rand::fill().
void oct_fill_randu | ( | octave_idx_type | n, |
double * | p | ||
) |
Definition at line 825 of file randmtzig.c.
References oct_randu().
Referenced by octave_rand::fill().
float oct_float_rande | ( | void | ) |
Definition at line 797 of file randmtzig.c.
References create_ziggurat_float_tables(), ERANDI, fke, RANDU, x, ZIGGURAT_EXP_R, and ZIGINT.
Referenced by octave_rand::do_float_scalar(), and oct_fill_float_rande().
float oct_float_randn | ( | void | ) |
Definition at line 756 of file randmtzig.c.
References create_ziggurat_float_tables(), fki, LMASK, randi32, RANDU, x, ZIGGURAT_NOR_INV_R, and ZIGGURAT_NOR_R.
Referenced by octave_rand::do_float_scalar(), and oct_fill_float_randn().
float oct_float_randu | ( | void | ) |
Definition at line 418 of file randmtzig.c.
References randu32().
Referenced by octave_rand::do_float_scalar(), and oct_fill_float_randu().
void oct_get_state | ( | uint32_t * | save | ) |
Definition at line 305 of file randmtzig.c.
References left, MT_N, and state.
Referenced by octave_rand::get_internal_state().
void oct_init_by_array | ( | uint32_t * | init_key, |
int | key_length | ||
) |
Definition at line 217 of file randmtzig.c.
References MT_N, oct_init_by_int(), and state.
Referenced by oct_init_by_entropy(), and octave_rand::set_internal_state().
void oct_init_by_entropy | ( | void | ) |
Definition at line 258 of file randmtzig.c.
References MT_N, and oct_init_by_array().
Referenced by octave_rand::do_reset(), octave_rand::initialize_mersenne_twister(), and next_state().
void oct_init_by_int | ( | uint32_t | s | ) |
Definition at line 196 of file randmtzig.c.
Referenced by oct_init_by_array().
double oct_rande | ( | void | ) |
Definition at line 630 of file randmtzig.c.
References create_ziggurat_tables(), ERANDI, ke, RANDU, x, ZIGGURAT_EXP_R, and ZIGINT.
Referenced by octave_rand::do_scalar(), and oct_fill_rande().
double oct_randn | ( | void | ) |
Definition at line 565 of file randmtzig.c.
References create_ziggurat_tables(), ki, NRANDI, randi32, RANDU, UMASK, x, ZIGGURAT_NOR_INV_R, and ZIGGURAT_NOR_R.
Referenced by octave_rand::do_scalar(), and oct_fill_randn().
double oct_randu | ( | void | ) |
Definition at line 411 of file randmtzig.c.
References randu53().
Referenced by octave_rand::do_scalar(), and oct_fill_randu().
void oct_set_state | ( | uint32_t * | save | ) |
Definition at line 295 of file randmtzig.c.
References MT_N, next, and state.
Referenced by octave_rand::set_internal_state().
|
static |
Definition at line 361 of file randmtzig.c.
References randi32.
|
static |
Definition at line 377 of file randmtzig.c.
References randi32.
|
static |
Definition at line 340 of file randmtzig.c.
References next, and next_state().
|
static |
|
static |
|
static |
Definition at line 445 of file randmtzig.c.
|
static |
Definition at line 673 of file randmtzig.c.
|
static |
Definition at line 671 of file randmtzig.c.
|
static |
Definition at line 443 of file randmtzig.c.
Referenced by load_path::loader::add_to_fcn_map(), load_path::loader::add_to_method_map(), cffti1(), load_path::loader::find_fcn(), load_path::loader::find_method(), higham_subp(), load_path::loader::move_fcn_map(), load_path::loader::move_method_map(), zbknu(), and zffti1().
|
static |
Definition at line 672 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and oct_float_rande().
|
static |
Definition at line 670 of file randmtzig.c.
Referenced by create_ziggurat_float_tables(), and oct_float_randn().
|
static |
Definition at line 673 of file randmtzig.c.
|
static |
Definition at line 671 of file randmtzig.c.
|
static |
Definition at line 190 of file randmtzig.c.
|
static |
Definition at line 191 of file randmtzig.c.
|
static |
Definition at line 192 of file randmtzig.c.
|
static |
Definition at line 444 of file randmtzig.c.
Referenced by create_ziggurat_tables(), and oct_rande().
|
static |
Definition at line 442 of file randmtzig.c.
Referenced by create_ziggurat_tables(), and oct_randn().
|
static |
Definition at line 189 of file randmtzig.c.
Referenced by symbol_info_list::symbol_info::display_line(), octave_diag_matrix::do_index_op(), octave_perm_matrix::do_index_op(), octave_stream_list::do_list_open_files(), do_load(), do_printf_string(), TerminalView::extendSelection(), Fcolloc(), idx_vector::is_permutation(), oct_get_state(), pr_scale_header(), print_DASPK_options(), print_DASRT_options(), print_DASSL_options(), print_descriptor(), print_LSODE_options(), print_Quad_options(), and Screen::writeSelectionToStream().
|
static |
Definition at line 187 of file randmtzig.c.
Referenced by KeyboardTranslator::findEntry(), jit_infer::infer(), octave_sort< T >::is_sorted(), next_state(), oct_set_state(), and randmt().
|
static |
Definition at line 188 of file randmtzig.c.
Referenced by QtHandles::Canvas::canvasToggleGrid(), default_warning_state(), display_warning_options(), F__db_next_breakpoint_quiet__(), Fdaspk(), Fdasrt(), Fdassl(), Flsode(), Fwarning(), uitoggletool::properties::get_property(), next_state(), oct_get_state(), oct_init_by_array(), oct_init_by_int(), oct_set_state(), set_warning_option(), set_warning_state(), KeyboardTranslator::Entry::setState(), warning_enabled(), and warning_query().
|
static |
Definition at line 445 of file randmtzig.c.
|
static |
Definition at line 443 of file randmtzig.c.
Referenced by cunhj(), Faddeeva_w(), Fordschur(), Fqz(), SCHUR::init(), FloatSCHUR::init(), EIG::init(), FloatEIG::init(), zbesy(), and zseri().