Package org.apache.commons.rng.sampling
Class UnitSphereSampler
- java.lang.Object
-
- org.apache.commons.rng.sampling.UnitSphereSampler
-
public class UnitSphereSampler extends java.lang.ObjectGenerate vectors isotropically located on the surface of a sphere.Sampling uses:
- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description UnitSphereSampler(int dimension, UniformRandomProvider rng)
-
Method Summary
Modifier and Type Method Description double[]nextVector()
-
-
-
Constructor Detail
-
UnitSphereSampler
public UnitSphereSampler(int dimension, UniformRandomProvider rng)- Parameters:
dimension- Space dimension.rng- Generator for the individual components of the vectors. A shallow copy will be stored in this instance.- Throws:
java.lang.IllegalArgumentException- Ifdimension <= 0
-
-