public class UnitSphereRandomVectorGenerator extends Object implements RandomVectorGenerator
Constructor and Description |
---|
UnitSphereRandomVectorGenerator(int dimension)
Create an object that will use a default RNG (
MersenneTwister ),
in order to generate the individual components. |
UnitSphereRandomVectorGenerator(int dimension,
RandomGenerator rand) |
public UnitSphereRandomVectorGenerator(int dimension, RandomGenerator rand)
dimension
- Space dimension.rand
- RNG for the individual components of the vectors.public UnitSphereRandomVectorGenerator(int dimension)
MersenneTwister
),
in order to generate the individual components.dimension
- Space dimension.public double[] nextVector()
nextVector
in interface RandomVectorGenerator
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.