public class DigramPicker extends Object
Constructor and Description |
---|
DigramPicker(Random prng,
DigramHist hist)
Construct a new digram picker object.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
Unit test main program for class DigramPicker.
|
char |
nextChar()
Returns the next randomly chosen letter as a character A through Z.
|
int |
nextInt()
Returns the next randomly chosen letter as an integer 0 through 25.
|
void |
start()
Start a new sequence of randomly chosen letters.
|
public DigramPicker(Random prng, DigramHist hist)
prng
- Pseudorandom number generator.hist
- Digram histogram object.public void start()
public char nextChar()
public int nextInt()
public static void main(String[] args) throws Exception
Usage: java DigramPicker file N seed
Exception
Copyright © 2017 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.