gmp_lib.gmp_randinit_mt Method

GMP Native Interface for .NET

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
)
Public Shared Sub gmp_randinit_mt ( 
	state As gmp_randstate_t
)
public:
static void gmp_randinit_mt(
	gmp_randstate_t^ state
)
static member gmp_randinit_mt : 
        state : gmp_randstate_t -> unit 

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);
' Create new random number generator state.
Dim state As 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)

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also