Class HypersphereRVG

  • All Implemented Interfaces:
    RandomVectorGenerator, Seedable

    public class HypersphereRVG
    extends Object
    implements RandomVectorGenerator
    Generates uniformly distributed points on the surface of a hypersphere.
    See Also:
    • "Marsaglia, G. "Choosing a Point from the Surface of a Sphere," Ann. Math. Stat. 43, 645-646, 1972."
    • http://mathworld.wolfram.com/HyperspherePointPicking.html
    • Constructor Detail

      • HypersphereRVG

        public HypersphereRVG​(int dimension,
                              RandomStandardNormalGenerator rnorm)
        Constructs a hypersphere RVG to generate random uniform points.
        Parameters:
        dimension - the dimension of the hypersphere
        rnorm - 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 Detail

      • seed

        public void seed​(long... seeds)
        Description copied from interface: Seedable
        Seed the random number/vector/scenario generator to produce repeatable experiments.
        Specified by:
        seed in interface Seedable
        Parameters:
        seeds - the seeds