GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
randmtzig.h File Reference
#include "octave-config.h"

Go to the source code of this file.

Macros

#define MT_N   624
 

Functions

void get_mersenne_twister_state (uint32_t *save)
 
void init_mersenne_twister ()
 
void init_mersenne_twister (const uint32_t *init_key, const int key_length)
 
void init_mersenne_twister (const uint32_t seed)
 
template<typename T >
rand_exponential ()
 
template<typename T >
void rand_exponential (octave_idx_type n, T *p)
 
template<>
double rand_exponential< double > ()
 
template<>
void rand_exponential< double > (octave_idx_type n, double *p)
 
template<>
float rand_exponential< float > ()
 
template<>
void rand_exponential< float > (octave_idx_type n, float *p)
 
template<typename T >
rand_normal ()
 
template<typename T >
void rand_normal (octave_idx_type n, T *p)
 
template<>
double rand_normal< double > ()
 
template<>
void rand_normal< double > (octave_idx_type n, double *p)
 
template<>
float rand_normal< float > ()
 
template<>
void rand_normal< float > (octave_idx_type n, float *p)
 
template<typename T >
rand_uniform ()
 
template<typename T >
void rand_uniform (octave_idx_type n, T *p)
 
template<>
double rand_uniform< double > ()
 
template<>
void rand_uniform< double > (octave_idx_type n, double *p)
 
template<>
float rand_uniform< float > ()
 
template<>
void rand_uniform< float > (octave_idx_type n, float *p)
 
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()

void get_mersenne_twister_state ( uint32_t *  save)

Definition at line 323 of file randmtzig.cc.

◆ init_mersenne_twister() [1/3]

void init_mersenne_twister ( )

Definition at line 263 of file randmtzig.cc.

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

◆ init_mersenne_twister() [2/3]

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

Definition at line 222 of file randmtzig.cc.

References init_mersenne_twister(), and MT_N.

◆ init_mersenne_twister() [3/3]

void init_mersenne_twister ( const uint32_t  seed)

Definition at line 201 of file randmtzig.cc.

Referenced by init_mersenne_twister().

◆ rand_exponential() [1/2]

template<typename T >
T rand_exponential ( )

◆ rand_exponential() [2/2]

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

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

template<>
double rand_exponential< double > ( )

Definition at line 664 of file randmtzig.cc.

Referenced by rand_exponential().

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

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

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

template<>
float rand_exponential< float > ( )

Definition at line 847 of file randmtzig.cc.

Referenced by rand_exponential().

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

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

◆ rand_normal() [1/2]

template<typename T >
T rand_normal ( )

◆ rand_normal() [2/2]

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

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

template<>
double rand_normal< double > ( )

Definition at line 598 of file randmtzig.cc.

Referenced by rand_normal().

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

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

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

template<>
float rand_normal< float > ( )

Definition at line 805 of file randmtzig.cc.

Referenced by rand_normal().

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

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

◆ rand_uniform() [1/2]

template<typename T >
T rand_uniform ( )

◆ rand_uniform() [2/2]

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

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

template<>
double rand_uniform< double > ( )

Definition at line 441 of file randmtzig.cc.

Referenced by rand_uniform< double >().

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

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

Definition at line 691 of file randmtzig.cc.

References n, and rand_uniform< double >().

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

template<>
float rand_uniform< float > ( )

Definition at line 449 of file randmtzig.cc.

Referenced by rand_uniform().

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

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

◆ set_mersenne_twister_state()

void set_mersenne_twister_state ( const uint32_t *  save)

Definition at line 315 of file randmtzig.cc.

References MT_N.