Bugzilla – Bug 369
RandomVariable: GetValue ->GenerateValue ?
Last modified: 2008-10-09 11:09:36 UTC
Real story. I was teaching a colleague to use random variables for scheduling, with code like this: Time t = Seconds (0); ExponentialVariable rng (5.14); for (n = 0; n < 10000; n++) { Schedule (t, ...); t += rng.GetValue (); } He asks, "shouldn't the 'ExponentialVariable rng (5.14)' part be inside the for loop?". I had to explain to him that rng.GetValue () actually generates a new value each time it is called. We came to the conclusion that perhaps GenerateValue () would be a better method name. So I leave here that thought for your consideration...
You might be happy to hear that I think that we are way past this kind of function name changes. I like your proposal though.
I agree that although the name GenerateValue might be slightly more intuitive, we've gone a while with GetValue, so we'll just leave it as it is.