public class RandomOrthogonalVectorGenerator extends Object implements DoubleVectorGenerator<DoubleVector>, Serializable
DoubleVector
s that are orthogonal to each
other based on configurable properties using the Gram-Schmidt
orthogonalization process. This class supports three properties:
"edu.ucla.sspace.index.RandomOrthogonalVectorGenerator.mean"
"edu.ucla.sspace.index.RandomOrthogonalVectorGenerator.std"
"edu.ucla.sspace.index.RandomOrthogonalVectorGenerator.length"
generateRandomVector
is ignored.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_VECTOR_LENGTH
The default number of dimensions to create in each
TernaryVector . |
static int |
DEFAULT_VECTOR_MEAN
The default number of values to set in an
TernaryVector . |
static int |
DEFAULT_VECTOR_STANDARD_DEVIATION
The default random std in the number of values that are set in an
TernaryVector . |
static Random |
RANDOM
A random number generator that can be accessed to other classes which
will rely on the same source of random values.
|
static String |
VECTOR_LENGTH_PROPERTY |
static String |
VECTOR_MEAN_PROPERTY
The property to specify the number of values to set in an
TernaryVector . |
static String |
VECTOR_STANDARD_DEVIATION_PROPERTY
The property to specify the std in the number of values to set in an
TernaryVector . |
Constructor and Description |
---|
RandomOrthogonalVectorGenerator(int vectorLength)
Constructs this instance using the system properties and no initial
vector.
|
RandomOrthogonalVectorGenerator(int vectorLength,
DoubleVector originalVector)
Contructs this instance using the system properties and the provided
intial vector.
|
RandomOrthogonalVectorGenerator(int vectorLength,
Properties properties,
DoubleVector originalVector)
Constructs this instance using the provided properties and uses an
initial vector.
|
public static final Random RANDOM
public static final String VECTOR_MEAN_PROPERTY
TernaryVector
.public static final String VECTOR_STANDARD_DEVIATION_PROPERTY
TernaryVector
.public static final String VECTOR_LENGTH_PROPERTY
public static final int DEFAULT_VECTOR_MEAN
TernaryVector
.public static final int DEFAULT_VECTOR_LENGTH
TernaryVector
.public static final int DEFAULT_VECTOR_STANDARD_DEVIATION
TernaryVector
.public RandomOrthogonalVectorGenerator(int vectorLength)
public RandomOrthogonalVectorGenerator(int vectorLength, DoubleVector originalVector)
public RandomOrthogonalVectorGenerator(int vectorLength, Properties properties, DoubleVector originalVector)
public DoubleVector generate()
DoubleVectorGenerator
VectorVector
with the provided length.generate
in interface DoubleVectorGenerator<DoubleVector>
generate
in interface Generator<DoubleVector>
length
- CAUTION: This value is ignoredCopyright © 2012. All Rights Reserved.