Class RandomShuffle

  extended byedu.cornell.lassp.houle.RngPack.RandomElement
      extended byedu.cornell.lassp.houle.RngPack.RandomShuffle
All Implemented Interfaces:

public class RandomShuffle
extends RandomElement

RandomShuffle uses one random number generator to shuffle the numbers produced by another to obliterate sequential correlations. To initialize a RandomShuffle, pass it two RandomElements. The first RandomElement is used to generate a table of random numbers and the second is used to choose one from the table. An example of usage is,

 RandomElement markov=new RandomShuffle(new Ranecu(),new Ranmar(),32)
which would generate a deck of 32 numbers from RANECU and use RANMAR to choose from the deck.

Source code is available.

Constructor Summary
RandomShuffle(RandomElement ga, RandomElement gb, int ds)
Method Summary
 double raw()
          The generator.
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 RandomShuffle(RandomElement ga,
                     RandomElement gb,
                     int ds)
ga - generator to fill shuffle deck
gb - geberator to choose from shuffle deck
ds - the size of the shuffle deck
Method Detail


public double raw()
The generator.

Specified by:
raw in class RandomElement
a random double in the range [0,1]
See Also: