ca.pfv.spmf.datastructures.kdtree
Class KNNPoint
- java.lang.Object
-
- ca.pfv.spmf.datastructures.kdtree.KNNPoint
-
-
Constructor Summary
Constructors Constructor and Description KNNPoint(double[] values, double distance)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(KNNPoint point2)Compare this point to another pointbooleanequals(java.lang.Object point2)Verify if two points are equals.java.lang.StringtoString()Return this point as a string.
-
-
-
Constructor Detail
-
KNNPoint
public KNNPoint(double[] values, double distance)Constructor- Parameters:
values- vectordistance- distance
-
-
Method Detail
-
compareTo
public int compareTo(KNNPoint point2)
Compare this point to another point- Specified by:
compareToin interfacejava.lang.Comparable<KNNPoint>- Parameters:
point2- the given point.- Returns:
- an integer <0 if the distance of this point is smaller than the distance of point2 an integer >0 if the distance of this point is larger than the one of point2 0 if the distance is the same.
-
toString
public java.lang.String toString()
Return this point as a string.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string
-
equals
public boolean equals(java.lang.Object point2)
Verify if two points are equals.- Overrides:
equalsin classjava.lang.Object- Parameters:
point2- a given point.- Returns:
- true if equals to that point.
-
-
DMelt 3.0 © DataMelt by jWork.ORG