13 #ifndef __UT_Stratify__
14 #define __UT_Stratify__
27 static void weightedFactor(
unsigned int total_samples,
fpreal uweight,
28 int &usize,
int &vsize,
bool exact =
false);
38 void init(
unsigned int total_samples,
fpreal uweight=1);
45 myDoneRegular =
false;
70 myV = sample_number / myUSize;
71 myU = sample_number - myV*myUSize;
72 myDoneRegular = myU >= myUSize || myV >= myVSize;
82 u = (u + (
fpreal)myU) * myUInc;
83 v = (v + (
fpreal)myV) * myVInc;
90 u = (u + (
fpreal)myU) * myUInc;
91 v = (v + (
fpreal)myV) * myVInc;
104 int myUSize, myVSize;
int getStratifiedSize() const
void setSample(unsigned int sample_number)
void stratify(fpreal32 &u, fpreal32 &v)
int isStratifiedSample() const
void stratify(fpreal64 &u, fpreal64 &v)