randomized
Class Die

java.lang.Object
  extended by randomized.Die

public class Die
extends Object

This class contains an implementation of a die by means of a coin. The implementation is based on the paper

Donald E. Knuth and Andrew C. Yao. The Complexity of Nonuniform Random Number Generation. In, J.F. Traub, editor, Proceedings of a Symposium on New Directions and Recent Results in Algorithms and Complexity, pages 375-428, Pittsburgh, PA, USA, April 1976. Academic Press.

Author:
Xin Zhang, Franck van Breugel

Constructor Summary
Die()
          Initializes this die.
 
Method Summary
 int roll()
          Returns the result of the roll of this die.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Die

public Die()
Initializes this die.

Method Detail

roll

public int roll()
Returns the result of the roll of this die.

Returns:
the result of the roll of this die.