
public final class VectorUtil extends Object
| Constructor and Description |
|---|
VectorUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <V extends NumberVector<?,?>> |
getRangeDouble(V vec)
Return the range across all dimensions.
|
static <V extends NumberVector<V,?>> |
randomVector(V template)
Produce a new vector based on random numbers in [0:1] of the same type and
dimensionality as the given vector.
|
static <V extends NumberVector<V,?>> |
randomVector(V template,
Random r)
Produce a new vector based on random numbers in [0:1] of the same type and
dimensionality as the given vector.
|
public static <V extends NumberVector<?,?>> DoubleMinMax getRangeDouble(V vec)
V - Vector typevec - Vector to process.public static <V extends NumberVector<V,?>> V randomVector(V template, Random r)
template - existing instance of wanted dimensionality.r - Random generatorpublic static <V extends NumberVector<V,?>> V randomVector(V template)
template - existing instance of wanted dimensionality.