public class CaseResamplingReplacementForObject<X> extends Object implements ObjectResampler<X>
newResample()
by multiple threads.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CACHE_SIZE
The default cache size = the number of available processors × 1000.
|
Constructor and Description |
---|
CaseResamplingReplacementForObject(X[] sample,
Class<X> clazz)
Constructs a bootstrap sample generator.
|
CaseResamplingReplacementForObject(X[] sample,
Class<X> clazz,
ConcurrentCachedRLG rlg)
Constructs a bootstrap sample generator.
|
CaseResamplingReplacementForObject(X[] sample,
Class<X> clazz,
RandomLongGenerator uniform)
Constructs a bootstrap sample generator.
|
Modifier and Type | Method and Description |
---|---|
X[] |
newResample()
Gets a resample from the original sample.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public static final int DEFAULT_CACHE_SIZE
public CaseResamplingReplacementForObject(X[] sample, Class<X> clazz)
sample
- the original sampleclazz
- the class of the sample objectspublic CaseResamplingReplacementForObject(X[] sample, Class<X> clazz, RandomLongGenerator uniform)
sample
- the original sampleclazz
- the class of the sample objectsuniform
- a uniform random long generatorpublic CaseResamplingReplacementForObject(X[] sample, Class<X> clazz, ConcurrentCachedRLG rlg)
sample
- the original sampleclazz
- the class of the sample objectsrlg
- a concurrent uniform random long generatorpublic void seed(long... seeds)
Seedable
public X[] newResample()
ObjectResampler
newResample
in interface ObjectResampler<X>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.