19 August 2016 09:07:17 PM HALTON_PRB: C++ version Test the HALTON library HALTON_TEST HALTON returns the I-th element of an M-dimensional Halton sequence. I HALTON(I) Use M = 1 0 0 1 0.5 2 0.25 3 0.75 4 0.125 5 0.625 6 0.375 7 0.875 8 0.0625 9 0.5625 10 0.3125 Use M = 2 0 0 0 1 0.5 0.333333 2 0.25 0.666667 3 0.75 0.111111 4 0.125 0.444444 5 0.625 0.777778 6 0.375 0.222222 7 0.875 0.555556 8 0.0625 0.888889 9 0.5625 0.037037 10 0.3125 0.37037 Use M = 3 0 0 0 0 1 0.5 0.333333 0.2 2 0.25 0.666667 0.4 3 0.75 0.111111 0.6 4 0.125 0.444444 0.8 5 0.625 0.777778 0.04 6 0.375 0.222222 0.24 7 0.875 0.555556 0.44 8 0.0625 0.888889 0.64 9 0.5625 0.037037 0.84 10 0.3125 0.37037 0.08 HALTON_SEQUENCE_TEST HALTON_SEQUENCE returns the elements I1 through I2 of an M-dimensional Halton sequence. HALTON_SEQUENCE(0,10,1,R): R: Col: 0 1 2 3 4 Row 0: 0 0.5 0.25 0.75 0.125 Col: 5 6 7 8 9 Row 0: 0.625 0.375 0.875 0.0625 0.5625 Col: 10 Row 0: 0.3125 HALTON_SEQUENCE(0,10,2,R): R: Col: 0 1 2 3 4 Row 0: 0 0.5 0.25 0.75 0.125 1: 0 0.333333 0.666667 0.111111 0.444444 Col: 5 6 7 8 9 Row 0: 0.625 0.375 0.875 0.0625 0.5625 1: 0.777778 0.222222 0.555556 0.888889 0.037037 Col: 10 Row 0: 0.3125 1: 0.37037 HALTON_SEQUENCE(0,10,3,R): R: Col: 0 1 2 3 4 Row 0: 0 0.5 0.25 0.75 0.125 1: 0 0.333333 0.666667 0.111111 0.444444 2: 0 0.2 0.4 0.6 0.8 Col: 5 6 7 8 9 Row 0: 0.625 0.375 0.875 0.0625 0.5625 1: 0.777778 0.222222 0.555556 0.888889 0.037037 2: 0.04 0.24 0.44 0.64 0.84 Col: 10 Row 0: 0.3125 1: 0.37037 2: 0.08 HALTON_SEQUENCE(10,0,3,R): R: Col: 0 1 2 3 4 Row 0: 0.3125 0.5625 0.0625 0.875 0.375 1: 0.37037 0.037037 0.888889 0.555556 0.222222 2: 0.08 0.84 0.64 0.44 0.24 Col: 5 6 7 8 9 Row 0: 0.625 0.125 0.75 0.25 0.5 1: 0.777778 0.444444 0.111111 0.666667 0.333333 2: 0.04 0.8 0.6 0.4 0.2 Col: 10 Row 0: 0 1: 0 2: 0 HALTON_INVERSE_TEST HALTON_INVERSE inverts an element of a Halton sequence. I R=HALTON(I,3) HALTON_INVERSE(R,3) 0 0 0 0 0 1 0.5 0.333333 0.2 1 2 0.25 0.666667 0.4 2 3 0.75 0.111111 0.6 3 4 0.125 0.444444 0.8 4 5 0.625 0.777778 0.04 5 6 0.375 0.222222 0.24 6 7 0.875 0.555556 0.44 7 8 0.0625 0.888889 0.64 8 9 0.5625 0.037037 0.84 9 10 0.3125 0.37037 0.08 10 HALTON_BASE_TEST HALTON_BASE returns the I-th element of an M-dimensional Halton sequence, using user-specified bases. M = 3 B: 2 3 5 0 0 0 0 1 0.5 0.333333 0.2 2 0.25 0.666667 0.4 3 0.75 0.111111 0.6 4 0.125 0.444444 0.8 5 0.625 0.777778 0.04 6 0.375 0.222222 0.24 7 0.875 0.555556 0.44 8 0.0625 0.888889 0.64 9 0.5625 0.037037 0.84 10 0.3125 0.37037 0.08 M = 3 B: 3 10 2 0 0 0 0 1 0.333333 0.1 0.5 2 0.666667 0.2 0.25 3 0.111111 0.3 0.75 4 0.444444 0.4 0.125 5 0.777778 0.5 0.625 6 0.222222 0.6 0.375 7 0.555556 0.7 0.875 8 0.888889 0.8 0.0625 9 0.037037 0.9 0.5625 10 0.37037 0.01 0.3125 HALTON_PRB Normal end of execution. 19 August 2016 09:07:17 PM