Click or drag to resize
gmp_libgmp_randinit_mt Method
Initialize state for a Mersenne Twister algorithm.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void gmp_randinit_mt(
	gmp_randstate_t state
)

Parameters

state
Type: Math.Gmp.Nativegmp_randstate_t
The state to initialize.
Remarks

This algorithm is fast and has good randomness properties.

Examples
// Create new random number generator state.
gmp_randstate_t state = new gmp_randstate_t();

// Initialize state with Mersenne Twister random number generator algorithm.
gmp_lib.gmp_randinit_mt(state);

// Free all memory occupied by state.
gmp_lib.gmp_randclear(state);
See Also