commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [Lang] proposed math extensions
Date Tue, 06 May 2003 21:07:10 GMT
In theory, much of this sounds useful. However the problem is where to stop.
A maths library could grow and grow to be bigger than [lang] itself. So care
must be taken.

Some of the simpler addditions to RandomUtils sound fine. Reseeding, extra
methods etc.

I am less sure about the need for Gaussian, Exponential, Poisson,  Binomial,
Geometric, or HyperGeometric distribution random numbrs - I don't even know
what most of these are. The solution may be to have a plugin style, that can
generate numbers from Random, SecureRandom or any of the above

Computing  densities  and  statistitics  sounds out of scope for [lang] to

Given this, perhaps you could discuss each item/submit small patches with
test cases to gradually introduce those features that make sense.


----- Original Message -----
From: "Phil Steitz" <>
To: "Jakarta Commons Developers List" <>
Sent: Sunday, April 27, 2003 8:36 PM
Subject: [Lang] proposed math extensions

> I have code (and tests :-) for each of the following that I would be
> willing to contribute.  Is any of this appropriate for lang.math?
> 1. Generate random numbers from Gaussian, Exponential, Poisson,
> Binomial, Geometric, or HyperGeometric distributions.
> 2. Use SecureRandom to provide cryptographically secure random sequences
> for each of the above, plus the stuff already in RandomUtils, plus
> secure random strings (useful for generating "unpredictable" session id's)
> 3. Compute binomial coeffiecients and binomial, geometric,
> hypergeometric densities
> 4. Generate univariate statistics or frequency distributions from input
> I could include the stuff in a patch to math.RandomUtils.  Not sure
> where (if anywhere) the other things belong.
> I would also like to see math.RandomUtils modified to support the
> a) reseeding the Random number generator. I could submit a patch to do
> this by adding a static Random to use in generating the uniform variates
> in place of math.random().
> b) add nextInt(min,max) (inclusive) and/or nextInt(IntRange r)
> I could submit a patch for this small extension as well.
> Phil
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message