| QuasiRandomNumberGenerator(RandomNumberStreamBasicRandGenType, Int32, Int32, BitArray) Constructor |
Initializes base class properties for a given type of quasi-random number generator.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public QuasiRandomNumberGenerator(
RandomNumberStreamBasicRandGenType generatorType,
int numDimensions,
int userPolynomialsFlag,
BitArray[] polynomials
)
Public Sub New (
generatorType As RandomNumberStreamBasicRandGenType,
numDimensions As Integer,
userPolynomialsFlag As Integer,
polynomials As BitArray()
)
public:
QuasiRandomNumberGenerator(
RandomNumberStreamBasicRandGenType generatorType,
int numDimensions,
int userPolynomialsFlag,
array<BitArray^>^ polynomials
)
new :
generatorType : RandomNumberStreamBasicRandGenType *
numDimensions : int *
userPolynomialsFlag : int *
polynomials : BitArray[] -> QuasiRandomNumberGenerator
Parameters
- generatorType RandomNumberStreamBasicRandGenType
- The type of generator.
- numDimensions Int32
- Random vectors of this dimension are to be generated.
- userPolynomialsFlag Int32
- VSL flag in parameters array indicating that
user defined polynomials are being used.
- polynomials BitArray
- If the generator requires a set of polynomials over
the field Z2 (finite field of integers modulo 2), the are specified here as an
array of polynomial coefficients.
Since the polynomial coefficients may only be either 0 or 1, they
may be specified as a bit array beginning with the leading coefficient
at index 0.
Example
The polynomial x^3 + x + 1 coefficents are specified as
[1 0 1 1]. The BitArray representing this polynomial may be
constructed as
BitArray p = new BitArray( new bool[] { true, false, true, true } );
See Also