public class ConcurrentCachedRVG extends java.lang.Object implements RandomVectorGenerator
ConcurrentCachedGenerator.| Constructor and Description |
|---|
ConcurrentCachedRVG(RandomVectorGenerator rvg)
Constructs a new instance which wraps the given random vector generator
and uses a cache which has 8 entries per available core.
|
ConcurrentCachedRVG(RandomVectorGenerator rvg,
int cacheSize)
Constructs a new instance which wraps the given random vector generator
and uses a cache of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
nextVector()
Get the next random vector.
|
void |
seed(long... seeds)
Delegate to the underlying random vector generator.
|
public ConcurrentCachedRVG(RandomVectorGenerator rvg, int cacheSize)
rvg - the underlying generatorcacheSize - the cache sizeConcurrentCachedGenerator.ConcurrentCachedGenerator(com.numericalmethod.suanshu.stats.random.concurrent.ConcurrentCachedGenerator.Generator, int)public ConcurrentCachedRVG(RandomVectorGenerator rvg)
rvg - the underlying generatorpublic double[] nextVector()
RandomVectorGeneratornextVector in interface RandomVectorGeneratorpublic void seed(long... seeds)
seed in interface RandomVectorGeneratorseeds - the seeds