
On 01/23/2011 04:40 PM, Steven Watanabe wrote:
AMDG
Over the last year I've been (slowly) updating Boost.Random to match the new standard. Unfortunately I just hit a problem that I don't have a good solution for. In the standard, the geometric_distribution is defined as $p(i) = p(1-p)^{i}$, with i >= 0. In the current Boost.Random code it is $p(i) = (1-p) p^{i-1}$, with i >= 1. The definition in the standard makes more sense, but I don't want to introduce a breaking change. I can see two options here:
* Leave the implementation alone and put a big warning in the documentation saying that the behavior doesn't match the standard.
That's not good. Why would anyone want to use it after the documentation said that?
* Since I'm also moving things into namespace boost::random, I can use the new definition and leave a version with the old behavior in namespace boost instead of having a using declaration. I'd still have to add a warning that boost::geometric_distribution isn't the same as boost::random::geometric_distribution.
That's better than the other, but I'd like to hear about the downside of a breaking change. Patrick