|
SOMVizard documentation Public API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--som.FVector
A feature vector.
Field Summary | |
protected double[] |
vector
Elements of the feature vector. |
Constructor Summary | |
FVector(som.FVectorGroup group)
Construct a new feature vector in the given group. |
|
FVector(int length)
Construct a new feature vector with the given length. |
|
FVector(java.lang.String s)
Construct a new feature vector from a string representation. |
|
FVector(java.lang.String s,
int length)
Construct a new feature vector from a string representation with the length of the vector known. |
Method Summary | |
void |
add(som.FVector v)
Add a vector to this vector. |
double |
difference(som.FVector v)
Calculate an ad hoc difference measure. |
int |
dimension()
Get the dimensionality of this vector. |
double |
distance(som.FVector v)
Calculate the Euclidian distance to another vector. |
double |
dotProduct(som.FVector v)
Calculate the dot product between this and another vector. |
double |
getValue(int index)
Get the value of an element. |
double |
length()
Calculate the geometric length of this vector. |
static void |
main(java.lang.String[] args)
A test driver. |
void |
normalize()
Normalize the length of the vector to 1. |
void |
setAll()
Set all values to 1. |
void |
setUnit(int feature)
Set vector as unit vector. |
void |
setValue(int index,
double value)
Set the value of an element. |
java.lang.String |
toString()
Return the string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double[] vector
Constructor Detail |
public FVector(java.lang.String s)
public FVector(java.lang.String s, int length)
public FVector(int length)
public FVector(som.FVectorGroup group)
Method Detail |
public void setUnit(int feature)
feature
- the index of the feature to be set.public void setAll()
public void setValue(int index, double value)
index
- the index of the element.value
- the value of the element.public double getValue(int index)
index
- the index of the element.
public void add(som.FVector v)
public double distance(som.FVector v)
public double dotProduct(som.FVector v)
public double difference(som.FVector v)
public void normalize()
public double length()
public int dimension()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
SOMVizard documentation Public API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |