Class KdNode<T>
A node of a KdTree<T>, which represents one or more points in the same location.
Inherited Members
Namespace: NetTopologySuite.Index.KdTree
Assembly: NetTopologySuite.dll
Syntax
public class KdNode<T>
where T : class
Type Parameters
Name | Description |
---|---|
T | The type of the object |
Constructors
| Improve this Doc View SourceKdNode(Coordinate, T)
Creates a new KdNode.
Declaration
public KdNode(Coordinate p, T data)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point location of new node |
T | data | A data objects to associate with this node |
KdNode(Double, Double, T)
Creates a new KdNode.
Declaration
public KdNode(double x, double y, T data)
Parameters
Type | Name | Description |
---|---|---|
Double | x | coordinate of point |
Double | y | coordinate of point |
T | data | A data objects to associate with this node |
Properties
| Improve this Doc View SourceCoordinate
Gets the location of this node
Declaration
public Coordinate Coordinate { get; }
Property Value
Type | Description |
---|---|
Coordinate | The |
Count
Gets the number of inserted points that are coincident at this location.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Data
Gets the user data object associated with this node.
Declaration
public T Data { get; }
Property Value
Type | Description |
---|---|
T | The user data |
IsRepeated
Gets whether more than one point with this value have been inserted (up to the tolerance)
Declaration
public bool IsRepeated { get; }
Property Value
Type | Description |
---|---|
Boolean |
Left
Gets or sets the left node of the tree
Declaration
public KdNode<T> Left { get; set; }
Property Value
Type | Description |
---|---|
KdNode<T> | The left node |
Right
Gets or sets the right node of the tree
Declaration
public KdNode<T> Right { get; set; }
Property Value
Type | Description |
---|---|
KdNode<T> | The right node |
X
Gets x-ordinate of this node
Declaration
public double X { get; }
Property Value
Type | Description |
---|---|
Double | The |
Y
Gets y-ordinate of this node
Declaration
public double Y { get; }
Property Value
Type | Description |
---|---|
Double | The |
Methods
| Improve this Doc View SourceSplitValue(Boolean)
Gets the split value at a node, depending on whether the node splits on X or Y. The X (or Y) ordinates of all points in the left subtree are less than the split value, and those in the right subtree are greater than or equal to the split value.
Declaration
public double SplitValue(bool isSplitOnX)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isSplitOnX | A flag whether the node splits a X or Y |
Returns
Type | Description |
---|---|
Double | The splitting value |