Class edu.cornell.lassp.houle.RngPack.RandomShuffle
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cornell.lassp.houle.RngPack.RandomShuffle

java.lang.Object
   |
   +----edu.cornell.lassp.houle.RngPack.RandomElement
           |
           +----edu.cornell.lassp.houle.RngPack.RandomShuffle

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.
References:

Source code is available.

Version:
1.0
Author:
Paul Houle (E-mail: houle@msc.cornell.edu)

Constructor Index

 o RandomShuffle(RandomElement, RandomElement, int)

Method Index

 o raw()
The generator.

Constructors

 o RandomShuffle
  public RandomShuffle(RandomElement ga,
                       RandomElement gb,
                       int ds)
Parameters:
ga - generator to fill shuffle deck
gb - geberator to choose from shuffle deck
ds - the size of the shuffle deck

Methods

 o raw
  public double raw()
The generator.
Overrides:
raw in class RandomElement
See Also:
raw

All Packages  Class Hierarchy  This Package  Previous  Next  Index