public static class RandomAlgorithms.Selector extends Object
| Constructor and Description |
|---|
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 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 © 2008–2023 Apache Software Foundation. All rights reserved.