Adding a wrapper makes total sense. That way, any RandomGenerator (ours or
someone elses) implementation can be used where Random objects are required.
Likewise, a RandomGenerator that wraps a Random would be a good addition.
Then any Random extension can be used inside commons-math. With
an a lot less heftier than what I was
anticipating.
Good work,
Brent Worden
-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 15, 2005 1:39 PM
To: Jakarta Commons Developers List
Subject: Re: [math] Making PRNG pluggable in o.a.c.m.random classes
The implementation looks good an a lot less heftier than what I was
anticipating.
Good work,
Brent Worden
-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 15, 2005 1:39 PM
To: Jakarta Commons Developers List
Subject: Re: [math] Making PRNG
The implementation looks good an a lot less heftier than what I was
anticipating.
Good work,
Brent Worden
-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 15, 2005 1:39 PM
To: Jakarta Commons Developers List
Subject: Re: [math] Making PRNG
I committed the changes described above. Feedback welcome. I tested
adapting and integration a RngPack generator. Adaptor for Mersenne
Twister looks like this (base adaptor for all RngPack generators would
be similar):
/**
* AbstractRandomGenerator based on RngPack RanMT generator.
*/
public
1) Extract the interface from java.util.Random -- same names and
contracts. Call this interface RandomGenerator. It will contain:
setSeed(long seed)
nextBytes(byte[] bytes)
int nextInt()
int nextInt(int n)
long nextLong()
boolean nextBoolean()
double nextDouble()
float nextFloat()
1) Extract the interface from java.util.Random -- same names and
contracts. Call this interface RandomGenerator. It will contain:
setSeed(long seed)
nextBytes(byte[] bytes)
int nextInt()
int nextInt(int n)
long nextLong()
boolean nextBoolean()
double nextDouble()
float nextFloat()
On 5/10/05, Brent Worden [EMAIL PROTECTED] wrote:
1) Extract the interface from java.util.Random -- same names and
contracts. Call this interface RandomGenerator. It will contain:
setSeed(long seed)
nextBytes(byte[] bytes)
int nextInt()
int nextInt(int n)
long nextLong()
I think this would be a fine step towards plugability. I think you'll
find something similar in Colt.
Phil Steitz wrote:
Here is the plan that I proposed a while back. Better ideas /
improvements welcome. Also, can someone confirm that step 1 below is
OK from license/IP perspective? - thx
1)
Here is the plan that I proposed a while back. Better ideas /
improvements welcome. Also, can someone confirm that step 1 below is
OK from license/IP perspective? - thx
1) Extract the interface from java.util.Random -- same names and
contracts. Call this interface RandomGenerator. It will
10 matches
Mail list logo