Hi.

In CM, a base class "BitsStreamGenerator" contains methods for
generating various primitive types from a bit source (to be
implemented by subclasses by overriding the "next(int bits)"
method).
For example, to get a random "long" value, the following code
is called:
---CUT---
    public long nextLong() {
        final long high  = ((long) next(32)) << 32;
        final long  low  = (next(32)) & 0xffffffffL;
        return high | low;
    }
---CUT---

If the bit source were provided by the JDK's "Random" class,
is it assumed that the "long" value generated by the above
code will always be equal to the "long" value generated by
the call to JDK's "Random" class?

In other words, how "standard" are the default implementations
of the methods defined in "BitsStreamGenerator"?

And what are the compatibility requirements with respect to
reproducibility of the sequences (between releases of the
library)?


Regards,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to