Click or drag to resize

SobolQuasiRandomGenerator(Int32, BitArray) Constructor

Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. Uses the given set of primitive polynomials to initialize the generator.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public SobolQuasiRandomGenerator(
	int numDimensions,
	BitArray[] primitivePolynomials
)

Parameters

numDimensions  Int32
The dimension.
primitivePolynomials  BitArray
Array of primitive polynomial coefficients. The number of primitive polynomials, and hence the length of the array polynomials, must be equal to numDimensions or numDimensions - 1. If the number of specified polynomials is one less than the number of dimensions the primitive polynomial for the first dimension will be initialized with a default value. Since a primitive polynomial coefficient may only be either 0 or 1, the polynomial coefficients may be specified as a bit array beginning with the leading coefficient at index 0.
Example
The primitive 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 } );
Exceptions
ExceptionCondition
InvalidArgumentExceptionThrown if the number of dimensions is zero or negative or if the length of the array polynomials is not equal to numDimensions or numDimensions - 1.
See Also