Class KdNode

Hierarchy: Object , KdNode
public class KdNode
A node of a KdTree, which represents one or more points in the same location.
Authors:
dskea
public KdNode(double _x, double _y, Object data)
Creates a new KdNode.
Parameters:
_x - _x coordinate of point
_y - _y coordinate of point
data - data a data objects to associate with this node
public KdNode(Coordinate p, Object data)
Creates a new KdNode.
Parameters:
p - p point location of new node
data - data a data objects to associate with this node
public double getX()
Returns the X coordinate of the node
Returns:
X coordinate of the node
public double getY()
Returns the Y coordinate of the node
Returns:
Y coordinate of the node
public Coordinate getCoordinate()
Returns the location of this node
Returns:
p location of this node
public Object getData()
Gets the user data object associated with this node.
public KdNode getLeft()
Returns the left node of the tree
Returns:
left node
public KdNode getRight()
Returns the right node of the tree
Returns:
right node
public int getCount()
Returns the number of inserted points that are coincident at this location.
Returns:
number of inserted points that this node represents
public boolean isRepeated()
Tests whether more than one point with this value have been inserted (up to the tolerance)
Returns:
true if more than one point have been inserted with this value