public static class RandomAlgorithms.Selector extends Object
Constructor and Description |
---|
RandomAlgorithms.Selector(int n,
double selPcnt,
Random rand)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getPoolSize()
Get the remaining random number pool size.
|
int |
next()
Select the next random number.
|
void |
reset()
Reset the selector for reuse usage.
|
public RandomAlgorithms.Selector(int n, double selPcnt, Random rand)
n
- The pool of integers: 0..n-1.selPcnt
- Percentage of selected numbers. This is just a hint for internal
memory optimization.rand
- Random number generator.Copyright © 2013 Apache Software Foundation. All rights reserved.