QuasiRandom.HaltonSequence Method

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static IEnumerable<Vector<double>> HaltonSequence(
	int dimension,
	int length
)

Parameters

dimension  Int32
The dimension of the vectors in the sequence.
length  Int32
The length of the sequence.

Return Value

IEnumerable<Vector<Double>>

Remarks

Use the HaltonSequence(Int32, Int32) method to enumerate a Halton sequence. A Halton sequence is one kind of quasi-random sequence. Quasi-random sequences, also called low discrepancy sequences, are sequences of vectors that progressively cover a multi-dimensional space with points that are uniformly distributed.

A Halton sequence in n dimensions actually consists of n separate sequences of numbers. Every sequence is generated from a different prime number. It has been used successfully for numerical integration in multiple dimensions.

A Halton sequence works very well for low-dimensional spaces. For higher-dimensional spaces (20 or more dimensions) the initial elements can be very poorly distributed over the space. Moreover, some correlation patterns have been observed for larger dimensions involving larger prime numbers, making the Halton sequence relatively unsuitable for higher dimensions.

The current value is a read-only vector with mutable values.

Exceptions

ArgumentOutOfRangeException

dimension is less than or equal to zero or greater than 40.

-or-

length is less than or equal to zero.

See Also