Class ThinRVG
- java.lang.Object
-
- dev.nm.stat.random.rng.multivariate.ThinRVG
-
- All Implemented Interfaces:
RandomVectorGenerator
,Seedable
public class ThinRVG extends Object implements RandomVectorGenerator
Thinning is a scheme that returns every m-th item, discarding the last m-1 items for each draw. This usually helps reduce serial correlation.
-
-
Constructor Summary
Constructors Constructor Description ThinRVG(RandomVectorGenerator rvg, int m)
Constructs a thinned RVG.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
nextVector()
Gets the next random vector.void
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
-
-
-
Constructor Detail
-
ThinRVG
public ThinRVG(RandomVectorGenerator rvg, int m)
Constructs a thinned RVG.- Parameters:
rvg
- an underlying RVGm
- the number of items to draw from the underlying RVG for each draw
-
-
Method Detail
-
nextVector
public double[] nextVector()
Description copied from interface:RandomVectorGenerator
Gets the next random vector.- Specified by:
nextVector
in interfaceRandomVectorGenerator
- Returns:
- the next random vector
-
-