Class HypersphereRVG
java.lang.Object
dev.nm.stat.random.rng.multivariate.HypersphereRVG
- All Implemented Interfaces:
RandomVectorGenerator
,Seedable
Generates uniformly distributed points on the surface of a hypersphere.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHypersphereRVG
(int dimension) Constructs a hypersphere RVG to generate random uniform points.HypersphereRVG
(int dimension, RandomStandardNormalGenerator rnorm) Constructs a hypersphere RVG to generate random uniform points. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Gets the next random vector.void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.
-
Constructor Details
-
HypersphereRVG
Constructs a hypersphere RVG to generate random uniform points.- Parameters:
dimension
- the dimension of the hyperspherernorm
- the standard Normal RNG to be used
-
HypersphereRVG
public HypersphereRVG(int dimension) Constructs a hypersphere RVG to generate random uniform points.- Parameters:
dimension
- the dimension of the hypersphere
-
-
Method Details
-
seed
public void seed(long... seeds) Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments. -
nextVector
public double[] nextVector()Description copied from interface:RandomVectorGenerator
Gets the next random vector.- Specified by:
nextVector
in interfaceRandomVectorGenerator
- Returns:
- the next random vector
-