Class UnitSphereSampler

java.lang.Object
org.apache.commons.rng.sampling.UnitSphereSampler
All Implemented Interfaces:
ObjectSampler<double[]>, SharedStateObjectSampler<double[]>, SharedStateSampler<SharedStateObjectSampler<double[]>>

public class UnitSphereSampler extends Object implements SharedStateObjectSampler<double[]>
Generate vectors isotropically located on the surface of a sphere.

Sampling in 2 or more dimensions uses:

Sampling in 1D uses the sign bit from UniformRandomProvider.nextInt() to set the direction of the vector.

Since:
1.1