|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cornell.lassp.houle.RngPack.RandomElement
edu.cornell.lassp.houle.RngPack.RandomSeedable
edu.cornell.lassp.houle.RngPack.RanMT
Mersenne Twister -- advanced psuedorandom generator with a period of 219937-1
Source code is available.
This class is derived from Sean Luke's implementation
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Constructor Summary | |
RanMT()
|
|
RanMT(Date d)
|
|
RanMT(int[] array)
If a 32 bit seed isn't enough for you, you can pass an array of 624 integers. |
|
RanMT(long seed)
|
Method Summary | |
double |
raw()
The abstract method that must be defined to make a working RandomElement. |
Methods inherited from class edu.cornell.lassp.houle.RngPack.RandomSeedable |
ClockSeed, ClockSeed |
Methods inherited from class edu.cornell.lassp.houle.RngPack.RandomElement |
choose, choose, clone, coin, coin, gaussian, gaussian, powlaw, raw, raw, uniform |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RanMT()
public RanMT(long seed)
public RanMT(Date d)
public RanMT(int[] array)
Method Detail |
public final double raw()
RandomElement
RandomJava
for an example of how to do this.
raw
in class RandomElement
RandomJava
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |