public class RandomHypersphereVG extends java.lang.Object implements VectorGenerator, java.io.Serializable
Constructor and Description |
---|
RandomHypersphereVG()
Uses default settings (on surface; radius 1; no axis cluster)
|
RandomHypersphereVG(boolean surface,
float radius,
float axisClusterFactor) |
Modifier and Type | Method and Description |
---|---|
float[][] |
genVectors(int number,
int dimension)
The vector distribution is decided by implementing classes.
|
float |
getAxisClusterFactor() |
boolean |
getOnSurface() |
float |
getRadius() |
void |
setAxisClusterFactor(float axisClusterFactor) |
void |
setOnSurface(boolean onSurface) |
void |
setRadius(float radius) |
public RandomHypersphereVG(boolean surface, float radius, float axisClusterFactor)
surface
- If true, vectors are generated on surface of hypersphere; if false, throughout
volume of hypersphereradius
- Radius of hypersphereaxisClusterFactor
- Value between 0 and 1, with higher values indicating greater clustering
of vectors around axes. 0 means even distribution; 1 means all vectors on axes.public RandomHypersphereVG()
public boolean getOnSurface()
public void setOnSurface(boolean onSurface)
onSurface
- True if generated vectors are on surface of hyperspherepublic float getRadius()
public void setRadius(float radius)
radius
- Radius of hyperspherepublic float getAxisClusterFactor()
public void setAxisClusterFactor(float axisClusterFactor)
axisClusterFactor
- Value between 0 and 1, with higher values indicating greater clustering
of vectors around axes. 0 means even distribution; 1 means all vectors on axes.public float[][] genVectors(int number, int dimension)
VectorGenerator
genVectors
in interface VectorGenerator
number
- Number of vectors to be returneddimension
- Dimension of the vectors to be returnedVectorGenerator.genVectors(int, int)