Constructor for G05State class

Syntax

C#
public G05State(
	int genid,
	int subid,
	int[] seed,
	out int ifail
)
Visual Basic
Public Sub New ( _
	genid As Integer, _
	subid As Integer, _
	seed As Integer(), _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
G05State(
	int genid, 
	int subid, 
	array<int>^ seed, 
	[OutAttribute] int% ifail
)
F#
new : 
        genid : int * 
        subid : int * 
        seed : int[] * 
        ifail : int byref -> G05State

Parameters

genid
Type: System..::..Int32
On entry: must contain the type of base generator to use.
genid=1
NAG basic generator.
genid=2
Wichmann Hill I generator.
genid=3
Mersenne Twister.
genid=4
Wichmann Hill II generator.
genid=5
ACORN generator.
genid=6
L'Ecuyer MRG32k3a generator.
See the G05 class for details of each of the base generators.
Constraint: genid=1, 2, 3, 4, 5 or 6.
subid
Type: System..::..Int32
On entry: if genid=2, subid indicates which of the 273 sub-generators to use. In this case, the subid+272 mod 273+1 sub-generator is used.
If genid=5, subid indicates the values of k and p to use, where k is the order of the generator, and p controls the size of the modulus, M, with M=2p×30. If subid<1, the default values of k=10 and p=2 are used, otherwise values for k and p are calculated from the formula, subid=k+1000p-1.
If genid=6 and subid mod 2=0 the range of the generator is set to 0,1, otherwise the range is set to 0,1; in this case the sequence is identical to the implementation of MRG32k3a in TestU01 (see L'Ecuyer and Simard (2002)) for identical seeds.
For all other values of genid, subid is not referenced.
seed
Type: array<System..::..Int32>[]()[][]
An array of size [lseed]
On entry: the initial (seed) values for the selected base generator. The number of initial values required varies with each of the base generators.
If genid=1, one seed is required.
If genid=2, four seeds are required.
If genid=3, 624 seeds are required.
If genid=4, four seeds are required.
If genid=5, k+1p seeds are required, where k and p are defined by subid. For the ACORN generator it is recommended that an odd value is used for seed[0].
If genid=6, six seeds are required.
If insufficient seeds are provided then the first lseed-1 values supplied in seed are used and the remaining values are randomly generated using the NAG basic generator. In such cases the NAG basic generator is initialized using the value supplied in seed[lseed-1].
Constraint: seed[i-1]1, for i=1,2,,lseed.
ifail
Type: System..::..Int32%
On exit: ifail=0 or -1 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

See Also