/[Apache-SVN]
ViewVC logotype

Revision 140838


Jump to revision: Previous Next
Author: tobrien
Date: Sun May 18 00:58:52 2003 UTC (21 years, 5 months ago)
Changed paths: 4
Log Message:
Phil Steitz wrote:

This commit contains the suite of random data generation utilities that
I originally
proposed as extensions to lang.math.  There is some functional overlap
with lang.math, but the contract and intention of this implementation is
different in several significant ways.

* the lang implementation maintains "immutability" of the underlying
   random number generator (emulating Math). The RandomData
   implementation allows users to reseed the random number generator(s)
   (this is in effect possible in the recent extensions to lang.math by
   passing in a user-supplied random as an actual parameter to the
   next() methods) Users can also reset the PRNG algorithm and provider
   used by the "secure" methods.

* RandomData includes "secure" methods (delegating to SecureRandom)

* RandomData will generate random deviates from exponential and poisson,
   as well as Gaussian and Uniform distributions.  These are useful in
   simulation applications.

* Overlapping somewhat with lang.StringUtils, RandomData will generate
   random hex strings.  There is a nextSecureHexString method that will
   (I claim :-) generate cryptographically secure string identifiers. I
   would appreciate feedback on this algorithm, which I have seen used
   elsewhere (similar to what tomcat does to generate session ids); but
   not documented as a standard.

PR: Bugzilla 20013
Obtained from: Phil S.
Submitted by: Phil S.
Reviewed by: Tim O.


Changed paths

Path Details
Directoryjakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/RandomData.java added
Directoryjakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/RandomDataImpl.java added
Directoryjakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/MathTestSuite.java modified , text changed
Directoryjakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/RandomDataTest.java added

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26