Click or drag to resize

NiederreiterQuasiRandomGenerator(Int32, BitArray) Constructor

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

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

Parameters

numDimensions  Int32
The dimension.
irreduciblePolynomials  BitArray
Array of irreducible polynomial coefficients. The number of irreducible 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 irreducible polynomial for the first dimension will be initialized with a default value. Since a irreducible 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 irreducible 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