/* How does the cube fare with unbiased extent sampling? */ #include #include #include "oracles.h" #include "extent-sampling.h" #define DIMENSION_START 5 #define DIMENSION_STEP 5 #define DIMENSION_STOP 50 #define TRIALS 100 #define RTOL 0.1 #define EDGE 1.0 double cube_oracle (const gsl_vector* x) { return cube_extent_oracle(x, EDGE); } int main () { gsl_rng_env_setup(); gsl_rng* r = gsl_rng_alloc(gsl_rng_default); FILE* fp = fopen("cube-window.dat", "w"); printf("dimension\tsamples\n"); fprintf(fp, "dimension\tsamples\n"); for (int dim=DIMENSION_START; dim<=DIMENSION_STOP; dim+=DIMENSION_STEP) { unsigned int total_samples=0; for (int i=0; i