Hi all,

I'd like to propose adding a Zipf (or Zipfian) integer distribution to commons-math.

The Zipf distribution is a distribution which (approximately) reflects many 'real-world' phenomena, e.g. the frequency of use of words in a language.

I have a patch available, including test case; per http://commons.apache.org/math/developers.html, I will add it to the wishlist and to Bugzilla (or Jira? I gather commons math uses Jira now but the page still says Bugzilla) and attach my patch if the response here is generally positive to the idea.

Note that the patch isn't perfect; in particular I've just stuck a method to calculate generalized harmonic numbers in the ZipfDistributionImpl class itself. I would suggest that a) it almost certainly shouldn't go there, and b) it could most certainly be done more efficiently (I'm using a simple cumulative loop), but I would like guidance on solving both of those issues from people who know the project and are better than me at mathematics (respectively).

Cheers,

Paul Cowan.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to