Example: FaureSequence

In this example, ten points of the Faure sequence are computed. The points are in a four-dimensional cube.
import com.imsl.stat.FaureSequence;
import com.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.201  0.275  0.533  0.694  
1  0.401  0.475  0.733  0.894  
2  0.601  0.675  0.933  0.094  
3  0.801  0.875  0.133  0.294  
4  0.841  0.115  0.573  0.934  
5  0.041  0.315  0.773  0.134  
6  0.241  0.515  0.973  0.334  
7  0.441  0.715  0.173  0.534  
8  0.641  0.915  0.373  0.734  
9  0.681  0.155  0.613  0.374  

Link to Java source.