Documentation of 'ca.pfv.spmf.datastructures.kdtree.KNNPoint' Java class
KNNPoint
ca.pfv.spmf.datastructures.kdtree

Class KNNPoint

  • All Implemented Interfaces:
    java.lang.Comparable<KNNPoint>


    public class KNNPoint
    extends java.lang.Object
    implements java.lang.Comparable<KNNPoint>
    This class represents a point (a vector of double) stored or to be stored in a KDTree
    See Also:
    KDTree, KDNode
    • 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
      int compareTo(KNNPoint point2)
      Compare this point to another point
      boolean equals(java.lang.Object point2)
      Verify if two points are equals.
      java.lang.String toString()
      Return this point as a string.
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KNNPoint

        public KNNPoint(double[] values,
                        double distance)
        Constructor
        Parameters:
        values - vector
        distance - distance
    • Method Detail

      • compareTo

        public int compareTo(KNNPoint point2)
        Compare this point to another point
        Specified by:
        compareTo in interface java.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:
        toString in class java.lang.Object
        Returns:
        a string
      • equals

        public boolean equals(java.lang.Object point2)
        Verify if two points are equals.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        point2 - a given point.
        Returns:
        true if equals to that point.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.