06 October 2025 01:24:20 AM walker_sample_test(): C version. Test walker_sample(). walker_sampler_test(): walker_sampler() creates Walker sample vectors Y and A for efficient sampling of a discrete probability vector. Test the Walker sampler with a Zipf-type probability After 100 warmup calls, next 3 values of drand48(): 0.0876897 0.347698 0.517176 Zipf probabilities for N = 10 and parameter P = 2 I X[I] 1 0.645258 2 0.161314 3 0.0716953 4 0.0403286 5 0.0258103 6 0.0179238 7 0.0131685 8 0.0100822 9 0.00796615 10 0.00645258 Randomly permuted X: I X[I] 1 0.00796615 2 0.0258103 3 0.645258 4 0.0716953 5 0.00645258 6 0.0179238 7 0.0100822 8 0.161314 9 0.0403286 10 0.0131685 Built the sampler i Y[i] A[i]: 1 0.079661 3 2 0.258103 3 3 1.000000 3 4 0.716953 3 5 0.064526 3 6 0.179238 3 7 0.100822 8 8 0.117253 3 9 0.403286 8 10 0.131685 3 100000 samples: prob #samples: 0.007966 791 0.025810 2598 0.645258 64386 0.071695 7252 0.006453 641 0.017924 1808 0.010082 949 0.161314 16201 0.040329 4031 0.013169 1343 sumvar = 0.586454 (should be about 1) Verification sum = 1.11022e-16 (Should be close to 0) walker_sample_test(): Normal end of execution. 06 October 2025 01:24:20 AM