|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.util.VectorUtilities
public class VectorUtilities
Date: Feb 13, 2009 11:33:50 AM
Constructor Summary | |
---|---|
VectorUtilities()
|
Method Summary | |
---|---|
static float[] |
doubleToFloat(double[] vec)
|
static double[] |
floatToDouble(float[] vec)
|
static float[] |
normalizeVector(float[] vec)
Returns the normalized version of a vector, i.e. |
static float |
scalarProduct(float[] vec1,
double[] vec2)
Returns the scalar product (dot product) of two vectors for normalized vectors this is the same as cosine similarity. |
static float |
scalarProduct(float[] vec1,
float[] vec2)
Returns the scalar product (dot product) of two vectors for normalized vectors this is the same as cosine similarity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VectorUtilities()
Method Detail |
---|
public static float scalarProduct(float[] vec1, float[] vec2)
vec1
- First vector.vec2
- Second vector.
public static float scalarProduct(float[] vec1, double[] vec2)
vec1
- First vector.vec2
- Second vector.
public static float[] doubleToFloat(double[] vec)
public static double[] floatToDouble(float[] vec)
public static float[] normalizeVector(float[] vec)
vec
- Vector whose normalized version is requested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |