Example: FaureSequence
In this example, ten points of the Faure sequence are computed. The points are in a four-dimensional cube.
using System;
using FaureSequence = Imsl.Stat.FaureSequence;
using PrintMatrix = Imsl.Math.PrintMatrix;
public class FaureSequenceEx1
{
public static void Main(String[] args)
{
FaureSequence seq = new FaureSequence(4);
double[][] x = new double[10][];
for (int k = 0; k < 10; k++)
{
x[k] = seq.NextPoint();
}
new PrintMatrix("Faure Sequence").Print(x);
}
}
Output
Faure Sequence
0 1 2 3
0 0.201344 0.274944 0.532544 0.694144
1 0.401344 0.474944 0.732544 0.894144
2 0.601344 0.674944 0.932544 0.094144
3 0.801344 0.874944 0.132544 0.294144
4 0.841344 0.114944 0.572544 0.934144
5 0.041344 0.314944 0.772544 0.134144
6 0.241344 0.514944 0.972544 0.334144
7 0.441344 0.714944 0.172544 0.534144
8 0.641344 0.914944 0.372544 0.734144
9 0.681344 0.154944 0.612544 0.374144
Link to C# source.