MOA 12.03
Real Time Analytics for Data Streams
|
Static Public Member Functions | |
static void | addVectors (double[] a1, double[] a2) |
Adds the second array to the first array element by element. | |
static double[] | copyVector (double[] a) |
Copies an array of doubles. | |
static void | normalizeVector (double[] a) |
Normalizes the given vector. | |
static void | multiplyVector (double[] a, double f) |
Scales the vector a by the factor f. | |
static double | calculateLength (double[] a) |
Calculates the length of the given vector. | |
static double | calculateDistance (final double[] a1, final double[] a2) |
Calculates the euclidean distance between two given points. | |
static boolean | isZero (double[] vector) |
static void | addConstant (double[] vector, double c) |
Adds a constant to all entries of this vector. |
Definition at line 23 of file clusterers/clustree/util/DoubleVector.java.
static void moa.clusterers.clustree.util.DoubleVector.addConstant | ( | double[] | vector, |
double | c | ||
) | [static] |
Adds a constant to all entries of this vector.
vector | |
c |
Definition at line 130 of file clusterers/clustree/util/DoubleVector.java.
static void moa.clusterers.clustree.util.DoubleVector.addVectors | ( | double[] | a1, |
double[] | a2 | ||
) | [static] |
Adds the second array to the first array element by element.
The arrays must have the same length.
a1 | Vector to which the second vector is added. |
a2 | Vector to be addded. This vector does not change. |
Definition at line 31 of file clusterers/clustree/util/DoubleVector.java.
static double moa.clusterers.clustree.util.DoubleVector.calculateDistance | ( | final double[] | a1, |
final double[] | a2 | ||
) | [static] |
Calculates the euclidean distance between two given points.
Both double arrays must have the same number of elements, otherwise an assertion fails.
a1 | The first point |
a2 | The second point |
Definition at line 100 of file clusterers/clustree/util/DoubleVector.java.
static double moa.clusterers.clustree.util.DoubleVector.calculateLength | ( | double[] | a | ) | [static] |
Calculates the length of the given vector.
a | A vector (double array) |
Definition at line 83 of file clusterers/clustree/util/DoubleVector.java.
Referenced by moa.clusterers.clustree.util.DoubleVector.normalizeVector().
static double [] moa.clusterers.clustree.util.DoubleVector.copyVector | ( | double[] | a | ) | [static] |
Copies an array of doubles.
a | a vector (double array) |
Definition at line 47 of file clusterers/clustree/util/DoubleVector.java.
static boolean moa.clusterers.clustree.util.DoubleVector.isZero | ( | double[] | vector | ) | [static] |
vector |
Definition at line 117 of file clusterers/clustree/util/DoubleVector.java.
static void moa.clusterers.clustree.util.DoubleVector.multiplyVector | ( | double[] | a, |
double | f | ||
) | [static] |
Scales the vector a by the factor f.
a | A vector (double array) |
f | the Scale factor |
Definition at line 73 of file clusterers/clustree/util/DoubleVector.java.
static void moa.clusterers.clustree.util.DoubleVector.normalizeVector | ( | double[] | a | ) | [static] |
Normalizes the given vector.
a | A vector (double array) |
Definition at line 61 of file clusterers/clustree/util/DoubleVector.java.