Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::sfmt Class Reference

Public Member Functions

 sfmt ()
 
 sfmt (uint32_t seed)
 
 sfmt (uint32_t *init_key, int key_length)
 
virtual ~sfmt ()
 Standard deconstructor.
 
void sfmt_fill_array8 (uint8_t *array, int size)
 
void sfmt_fill_array16 (uint16_t *array, int size)
 
void sfmt_fill_array32 (uint32_t *array, int size)
 
void sfmt_fill_array64 (uint64_t *array, int size)
 
void sfmt_init_gen_rand (uint32_t seed)
 
void sfmt_init_by_array (uint32_t *init_key, int key_length)
 
const char * sfmt_get_idstring ()
 
int sfmt_get_min_array_size8 ()
 
int sfmt_get_min_array_size16 ()
 
int sfmt_get_min_array_size32 ()
 
int sfmt_get_min_array_size64 ()
 
void sfmt_gen_rand_all ()
 
uint32_t sfmt_genrand_uint32 ()
 
uint64_t sfmt_genrand_uint64 ()
 
double sfmt_to_real1 (uint32_t v)
 
double sfmt_genrand_real1 ()
 
double sfmt_to_real2 (uint32_t v)
 
double sfmt_genrand_real2 ()
 
double sfmt_to_real3 (uint32_t v)
 
double sfmt_genrand_real3 ()
 
double sfmt_to_res53 (uint64_t v)
 
double sfmt_genrand_res53 ()
 
double sfmt_to_res53_mix (uint32_t x, uint32_t y)
 
double sfmt_genrand_res53_mix ()
 
int idxof (int i)
 
void gen_rand_array (w128_t *array, int size)
 
uint32_t func1 (uint32_t x)
 
uint32_t func2 (uint32_t x)
 
void period_certification ()
 

Constructor & Destructor Documentation

◆ sfmt() [1/3]

ProtocolPP::sfmt::sfmt ( )

Standard constructor for SFMT that initializes with a value of 0x01234567

◆ sfmt() [2/3]

ProtocolPP::sfmt::sfmt ( uint32_t  seed)
explicit

Standard constructor for SFMT that initializes with a value of seed

Parameters
seed- seed to initialize SFMT with

◆ sfmt() [3/3]

ProtocolPP::sfmt::sfmt ( uint32_t *  init_key,
int  key_length 
)

Standard constructor for SFMT that initializes with a value of init_key

Parameters
init_key- array of uint32_t to initialize SFMT with
key_length- size of the seed array

Member Function Documentation

◆ func1()

uint32_t ProtocolPP::sfmt::func1 ( uint32_t  x)
inline

This function represents a function used in the initialization by init_by_array

Parameters
x32-bit integer
Returns
32-bit integer

◆ func2()

uint32_t ProtocolPP::sfmt::func2 ( uint32_t  x)
inline

This function represents a function used in the initialization by init_by_array

Parameters
x32-bit integer
Returns
32-bit integer

◆ gen_rand_array()

void ProtocolPP::sfmt::gen_rand_array ( w128_t array,
int  size 
)
inline

This function fills the user-specified array with pseudorandom integers

Parameters
arrayan 128-bit array to be filled by pseudorandom numbers
sizenumber of 128-bit pseudorandom numbers to be generated

◆ idxof()

int ProtocolPP::sfmt::idxof ( int  i)
inline

This function simulate a 64-bit index of LITTLE ENDIAN in BIG ENDIAN machine.

Parameters
i- index to value

◆ period_certification()

void ProtocolPP::sfmt::period_certification ( )

This function represents a function used in the initialization by init_by_array

Returns
32-bit integer

◆ sfmt_fill_array16()

ProtocolPP::sfmt::sfmt_fill_array16 ( uint16_t *  array,
int  size 
)

Fills the user specified array with uint16_t values from the underlying w128_t array

Parameters
array- array to fill with uint16_t
size- number of uint16_t values requested

◆ sfmt_fill_array32()

ProtocolPP::sfmt::sfmt_fill_array32 ( uint32_t *  array,
int  size 
)

Fills the user specified array with uint32_t values from the underlying w128_t array

Parameters
array- array to fill with uint32_t
size- number of uint32_t values requested

◆ sfmt_fill_array64()

ProtocolPP::sfmt::sfmt_fill_array64 ( uint64_t *  array,
int  size 
)

Fills the user specified array with uint64_t values from the underlying w128_t array

Parameters
array- array to fill with uint64_t
size- number of uint64_t values requested

◆ sfmt_fill_array8()

ProtocolPP::sfmt::sfmt_fill_array8 ( uint8_t *  array,
int  size 
)

Fills the user specified array with uint8_t values from the underlying w128_t array

Parameters
array- array to fill with uint8_t
size- number of uint8_t values requested

◆ sfmt_gen_rand_all()

void ProtocolPP::sfmt::sfmt_gen_rand_all ( )

This function fills the internal state array with pseudorandom integers

◆ sfmt_genrand_real1()

double ProtocolPP::sfmt::sfmt_genrand_real1 ( )
inline

generates a random number on [0,1]-real-interval

Returns
double on [0,1]-real-interval
Here is the call graph for this function:

◆ sfmt_genrand_real2()

double ProtocolPP::sfmt::sfmt_genrand_real2 ( )
inline

generates a random number on [0,1)-real-interval

Returns
double on [0,1)-real-interval
Here is the call graph for this function:

◆ sfmt_genrand_real3()

double ProtocolPP::sfmt::sfmt_genrand_real3 ( )
inline

generates a random number on (0,1)-real-interval

Returns
double on (0,1)-real-interval
Here is the call graph for this function:

◆ sfmt_genrand_res53()

double ProtocolPP::sfmt::sfmt_genrand_res53 ( )
inline

generates a random number on [0,1) with 53-bit resolution

Returns
double on [0,1) with 53-bit resolution
Here is the call graph for this function:

◆ sfmt_genrand_res53_mix()

double ProtocolPP::sfmt::sfmt_genrand_res53_mix ( )
inline

generates a random number on [0,1) with 53-bit resolution using two 32bit integers.

Returns
double on [0,1) with 53-bit resolution
Here is the call graph for this function:

◆ sfmt_genrand_uint32()

uint32_t ProtocolPP::sfmt::sfmt_genrand_uint32 ( )
inline

This function generates and returns 32-bit pseudorandom number. init_gen_rand or init_by_array must be called before this function.

Returns
32-bit pseudorandom number
Here is the call graph for this function:

◆ sfmt_genrand_uint64()

uint64_t ProtocolPP::sfmt::sfmt_genrand_uint64 ( )
inline

This function generates and returns 64-bit pseudorandom number. init_gen_rand or init_by_array must be called before this function. The function gen_rand64 should not be called after gen_rand32, unless an initialization is again executed.

Returns
64-bit pseudorandom number
Here is the call graph for this function:

◆ sfmt_get_idstring()

ProtocolPP::sfmt::sfmt_get_idstring ( )

Returns unique identifier for this SFMT including internal state values

Returns
string representation of this SFMT

◆ sfmt_get_min_array_size16()

ProtocolPP::sfmt::sfmt_get_min_array_size16 ( )

This function returns the minimum size of array used for fill_array16() function

Returns
minimum size of array used for fill_array16() function.

◆ sfmt_get_min_array_size32()

ProtocolPP::sfmt::sfmt_get_min_array_size32 ( )

This function returns the minimum size of array used for fill_array32() function

Returns
minimum size of array used for fill_array32() function.

◆ sfmt_get_min_array_size64()

ProtocolPP::sfmt::sfmt_get_min_array_size64 ( )

This function returns the minimum size of array used for fill_array64() function

Returns
minimum size of array used for fill_array64() function.

◆ sfmt_get_min_array_size8()

ProtocolPP::sfmt::sfmt_get_min_array_size8 ( )

This function returns the minimum size of array used for fill_array8() function

Returns
minimum size of array used for fill_array8() function.

◆ sfmt_init_by_array()

ProtocolPP::sfmt::sfmt_init_by_array ( uint32_t *  init_key,
int  key_length 
)

Reseeds the random number generator with the uint32_t array

Parameters
init_key- array to initilize with
key_length- length of the init array

◆ sfmt_init_gen_rand()

ProtocolPP::sfmt::sfmt_init_gen_rand ( uint32_t  seed)

Reseeds the random number generator with the uint32_t

Parameters
seed- new seed

◆ sfmt_to_real1()

double ProtocolPP::sfmt::sfmt_to_real1 ( uint32_t  v)
inline

converts an unsigned 32-bit number to a double on [0,1]-real-interval.

Parameters
v32-bit unsigned integer
Returns
double on [0,1]-real-interval

◆ sfmt_to_real2()

double ProtocolPP::sfmt::sfmt_to_real2 ( uint32_t  v)
inline

converts an unsigned 32-bit integer to a double on [0,1)-real-interval.

Parameters
v32-bit unsigned integer
Returns
double on [0,1)-real-interval

◆ sfmt_to_real3()

double ProtocolPP::sfmt::sfmt_to_real3 ( uint32_t  v)
inline

converts an unsigned 32-bit integer to a double on (0,1)-real-interval.

Parameters
v32-bit unsigned integer
Returns
double on (0,1)-real-interval

◆ sfmt_to_res53()

double ProtocolPP::sfmt::sfmt_to_res53 ( uint64_t  v)
inline

converts an unsigned 32-bit integer to double on [0,1) with 53-bit resolution.

Parameters
v32-bit unsigned integer
Returns
double on [0,1)-real-interval with 53-bit resolution.

◆ sfmt_to_res53_mix()

double ProtocolPP::sfmt::sfmt_to_res53_mix ( uint32_t  x,
uint32_t  y 
)
inline

generates a random number on [0,1) with 53-bit resolution from two 32 bit integers

Parameters
x- first uint32_t
y- second uint32_t
Returns
random number on [0,1] with 53-bit resolution
Here is the call graph for this function:

The documentation for this class was generated from the following file: