void SobolGenerator::GetUniforms(MJArray& variates) {//this is the function to use to Sobel vectors void i4_sobol ( int dim_num, int *seed, float quasi[ ] ) float* quasi=(float *)malloc(sizeof(float)*GetDimensionality()); i4_sobol ( GetDimensionality(), (int*)SobolGenerator::seed,quasi ); for (unsigned long j=0; j < (unsigned long)GetDimensionality(); j++) variates[j] = quasi[j]; free(quasi); }
void SobolGenerator::GetUniforms(MJArray& variates) {// here is the Sobol sequence generated. Note that I have a static value to remember the seed. float *quasi= (float*)malloc( GetDimensionality()); static int seed_1=(int)SobolGenerator::seed; i4_sobol ( GetDimensionality(),&seed_1, quasi ); for (int j=0; j < GetDimensionality(); j++){ variates[j] =(double) quasi[j]; } free(quasi); }
void Filter::sampleQRS() { i4_sobol(mDimQMCVec,&mSeedQMC,mVectorQMC); mIndexQMC=0; }