Gives a random number in range [0,i) with resolution of RAND_MAX.
Definition at line 54 of file Random.h. References ILOG_VAR, and ILOG_WARNING. Referenced by RandomDouble(). 00055 { 00056 ILOG_VAR(Impala.Util.Random.RandomDouble); 00057 if(upperBound > RAND_MAX) 00058 ILOG_WARNING(upperBound <<" upperBound > RAND_MAX"); 00059 return (double) (((double) std::rand() / ((double) RAND_MAX + 1.0)) * 00060 upperBound); 00061 }
|