public class UnitSphereRandomVectorGenerator extends java.lang.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) |
Modifier and Type | Method and Description |
---|---|
double[] |
nextVector()
Generate a random vector.
|
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 © 2010 - 2020 Adobe. All Rights Reserved