|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectac.essex.ooechs.kmeans.Position
public class Position
Represents a position in n dimensional feature space.
Field Summary | |
---|---|
protected double[] |
values
The position is stored as an array of double values. |
Constructor Summary | |
---|---|
Position(double[] values)
Initialises the position with an array of double values, each of which represents the value of one feature. |
Method Summary | |
---|---|
Position |
copy()
Makes a copy of this position so that it can be used somewhere else without updating this object's position by accident. |
double |
getEuclideanDistanceTo(Position other)
Finds the Euclidian distance from this position to another position which is the root sum of squared differences. |
java.lang.String |
toString()
|
void |
updateToAverageOf(java.util.Vector<DataPoint> objects)
Finds the average position among a set of points' positions and then updates the current position to the average position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double[] values
Constructor Detail |
---|
public Position(double[] values)
Method Detail |
---|
public double getEuclideanDistanceTo(Position other)
public void updateToAverageOf(java.util.Vector<DataPoint> objects)
public Position copy()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |