randomized
Class Die
java.lang.Object
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 |
Die
public Die()
- Initializes this die.
roll
public int roll()
- Returns the result of the roll of this die.
- Returns:
- the result of the roll of this die.