public class ConcurrentCachedRLG extends Object implements RandomLongGenerator
ConcurrentCachedGenerator
.Constructor and Description |
---|
ConcurrentCachedRLG(RandomLongGenerator uniform)
Construct a new instance which wraps the given random long generator and
uses a cache which has 1000 entries per available core.
|
ConcurrentCachedRLG(RandomLongGenerator uniform,
int cacheSize)
Constructs a new instance which wraps the given random long generator and
uses a cache of the specified size.
|
Modifier and Type | Method and Description |
---|---|
double |
nextDouble()
Get the next random
double . |
long |
nextLong()
Get the next random
long . |
void |
seed(long... seeds)
Delegate to the underlying random long generator.
|
public ConcurrentCachedRLG(RandomLongGenerator uniform, int cacheSize)
uniform
- the underlying generatorcacheSize
- the cache sizeConcurrentCachedGenerator.ConcurrentCachedGenerator(dev.nm.stat.random.rng.concurrent.cache.ConcurrentCachedGenerator.Generator, int)
public ConcurrentCachedRLG(RandomLongGenerator uniform)
uniform
- the underlying generatorpublic long nextLong()
RandomLongGenerator
long
.nextLong
in interface RandomLongGenerator
long
public void seed(long... seeds)
public double nextDouble()
RandomNumberGenerator
double
.nextDouble
in interface RandomNumberGenerator
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.