/* File : Test.c */ /* Author : Eric Thiemard */ /* Version : 14.12.98 */ /* Language : C */ /* Related paper : Eric Thiemard "Economic Generation of Low- */ /* Discrepancy Sequences with a b-ary Gray Code". Submitted */ /* in december 1998 to TOMACS : ACM Transactions on Modeling */ /* and Computer Simulation. */ /* This test routine is part of the GrayFaure package. Given */ /* a dimension s, a number of iterations N, and a skip value, */ /* it generates and prints N points of a s-dimensional Faure */ /* low-discrepancy sequence in base b (the smallest prime>=s) */ /* skipping the first b^skip points. The sequence is shuffled */ /* with a b-ary Gray code. */ #include #include #include #include "GrayFaure.h" static void usage(char *s) { fprintf(stderr,"Usage: %s \"Dimension>=2\"\ \"Iterations\" \"0<=Skip0;iterations--) { Faure = GrayFaureNext(); if (Faure==NULL) { fprintf(stderr,"Maximum index reached ; skip might be too high.\n"); exit(EXIT_FAILURE); } for (i=0;i