|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.util.VectorTools
public class VectorTools
Static methods operating on the DoubleVector class.
| Constructor Summary | |
|---|---|
VectorTools()
|
|
| Method Summary | |
|---|---|
static DoubleVector |
add(DoubleVector v1,
DoubleVector v2)
Performs an addition of two double vectors. |
static boolean |
hasValidValues(DoubleVector vector)
Tests if all values in the vector are valid. |
static void |
init(DoubleVector vector,
double initValue)
Initialises the vector with a given value. |
static DoubleVector |
mean(Collection<DoubleVector> vectors)
Computes the mean vector of a set of vectors. |
static DoubleVector |
normalize(DoubleVector vector)
Normalises a vector (LP norm is used). |
static double |
normLP(DoubleVector vector)
Computes the LP norm of the vector. |
static DoubleVector |
scalarDiv(DoubleVector vector,
double divisor)
Computes the scalar division of a double vector. |
static DoubleVector |
sum(Collection<DoubleVector> vectors)
Computes the sum of a collection of double vectors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VectorTools()
| Method Detail |
|---|
public static DoubleVector add(DoubleVector v1,
DoubleVector v2)
v1 - the first vector.v2 - the second vector.
public static void init(DoubleVector vector,
double initValue)
vector - the vector to be initialised.initValue - the initialisation value.
public static DoubleVector scalarDiv(DoubleVector vector,
double divisor)
vector - the vector.divisor - the divisor.
public static DoubleVector sum(Collection<DoubleVector> vectors)
vectors - a collection of double vectors.
public static DoubleVector mean(Collection<DoubleVector> vectors)
vectors - the collection of double vectors whose mean vector has to be computed.
public static double normLP(DoubleVector vector)
vector - the vector to compute the LP norm.
public static DoubleVector normalize(DoubleVector vector)
vector - the vector to be normalised.
public static boolean hasValidValues(DoubleVector vector)
vector - the vector to test.
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||