GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
randmtzig.h File Reference
#include "octave-config.h"
Include dependency graph for randmtzig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MT_N   624
 

Functions

OCTAVE_API void get_mersenne_twister_state (uint32_t *save)
 
OCTAVE_API void init_mersenne_twister (const uint32_t *init_key, const int key_length)
 
OCTAVE_API void init_mersenne_twister (const uint32_t seed)
 
OCTAVE_API void init_mersenne_twister (void)
 
template<typename T >
OCTAVE_API void rand_exponential (octave_idx_type n, T *p)
 
template<typename T >
OCTAVE_APIrand_exponential (void)
 
template<>
OCTAVE_API void rand_exponential< double > (octave_idx_type n, double *p)
 
template<>
OCTAVE_API double rand_exponential< double > (void)
 
template<>
OCTAVE_API void rand_exponential< float > (octave_idx_type n, float *p)
 
template<>
OCTAVE_API float rand_exponential< float > (void)
 
template<typename T >
OCTAVE_API void rand_normal (octave_idx_type n, T *p)
 
template<typename T >
OCTAVE_APIrand_normal (void)
 
template<>
OCTAVE_API void rand_normal< double > (octave_idx_type n, double *p)
 
template<>
OCTAVE_API double rand_normal< double > (void)
 
template<>
OCTAVE_API void rand_normal< float > (octave_idx_type n, float *p)
 
template<>
OCTAVE_API float rand_normal< float > (void)
 
template<typename T >
OCTAVE_API void rand_uniform (octave_idx_type n, T *p)
 
template<typename T >
OCTAVE_APIrand_uniform (void)
 
template<>
OCTAVE_API void rand_uniform< double > (octave_idx_type n, double *p)
 
template<>
OCTAVE_API double rand_uniform< double > (void)
 
template<>
OCTAVE_API void rand_uniform< float > (octave_idx_type n, float *p)
 
template<>
OCTAVE_API float rand_uniform< float > (void)
 
OCTAVE_API void set_mersenne_twister_state (const uint32_t *save)
 

Macro Definition Documentation

◆ MT_N

#define MT_N   624

Definition at line 72 of file randmtzig.h.

Function Documentation

◆ get_mersenne_twister_state()

OCTAVE_API void get_mersenne_twister_state ( uint32_t *  save)

Definition at line 318 of file randmtzig.cc.

References left, MT_N, and state.

Referenced by rand::get_internal_state().

◆ init_mersenne_twister() [1/3]

OCTAVE_API void init_mersenne_twister ( const uint32_t *  init_key,
const int  key_length 
)

Definition at line 220 of file randmtzig.cc.

References init_mersenne_twister(), initf, left, MT_N, and state.

◆ init_mersenne_twister() [2/3]

OCTAVE_API void init_mersenne_twister ( const uint32_t  seed)

◆ init_mersenne_twister() [3/3]

OCTAVE_API void init_mersenne_twister ( void  )

Definition at line 260 of file randmtzig.cc.

References getpid(), init_mersenne_twister(), min(), MT_N, and n.

◆ rand_exponential() [1/2]

template<typename T >
OCTAVE_API void rand_exponential ( octave_idx_type  n,
T *  p 
)

◆ rand_exponential() [2/2]

template<typename T >
OCTAVE_API T rand_exponential ( void  )

◆ rand_exponential< double >() [1/2]

template<>
OCTAVE_API void rand_exponential< double > ( octave_idx_type  n,
double *  p 
)

◆ rand_exponential< double >() [2/2]

template<>
OCTAVE_API double rand_exponential< double > ( void  )

Definition at line 649 of file randmtzig.cc.

References create_ziggurat_tables(), ERANDI, fe, initt, ke, RANDU, we, x, ZIGGURAT_EXP_R, and ZIGINT.

Referenced by rand::exponential(), rand::fill(), and rand_exponential().

◆ rand_exponential< float >() [1/2]

template<>
OCTAVE_API void rand_exponential< float > ( octave_idx_type  n,
float *  p 
)

◆ rand_exponential< float >() [2/2]

template<>
OCTAVE_API float rand_exponential< float > ( void  )

◆ rand_normal() [1/2]

template<typename T >
OCTAVE_API void rand_normal ( octave_idx_type  n,
T *  p 
)

◆ rand_normal() [2/2]

template<typename T >
OCTAVE_API T rand_normal ( void  )

◆ rand_normal< double >() [1/2]

template<>
OCTAVE_API void rand_normal< double > ( octave_idx_type  n,
double *  p 
)

◆ rand_normal< double >() [2/2]

template<>
OCTAVE_API double rand_normal< double > ( void  )

◆ rand_normal< float >() [1/2]

template<>
OCTAVE_API void rand_normal< float > ( octave_idx_type  n,
float *  p 
)

◆ rand_normal< float >() [2/2]

template<>
OCTAVE_API float rand_normal< float > ( void  )

◆ rand_uniform() [1/2]

template<typename T >
OCTAVE_API void rand_uniform ( octave_idx_type  n,
T *  p 
)

◆ rand_uniform() [2/2]

template<typename T >
OCTAVE_API T rand_uniform ( void  )

◆ rand_uniform< double >() [1/2]

template<>
OCTAVE_API void rand_uniform< double > ( octave_idx_type  n,
double *  p 
)

Definition at line 675 of file randmtzig.cc.

References n, and rand_uniform< double >().

◆ rand_uniform< double >() [2/2]

template<>
OCTAVE_API double rand_uniform< double > ( void  )

◆ rand_uniform< float >() [1/2]

template<>
OCTAVE_API void rand_uniform< float > ( octave_idx_type  n,
float *  p 
)

◆ rand_uniform< float >() [2/2]

template<>
OCTAVE_API float rand_uniform< float > ( void  )

Definition at line 438 of file randmtzig.cc.

References randu24().

Referenced by rand::fill(), rand_uniform(), and rand::uniform().

◆ set_mersenne_twister_state()

OCTAVE_API void set_mersenne_twister_state ( const uint32_t *  save)

Definition at line 311 of file randmtzig.cc.

References left, MT_N, next, and state.

Referenced by rand::set_internal_state().