Class NodeBase<T>
The base class for nodes in a Bintree.
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public abstract class NodeBase<T>
Type Parameters
Fields
|
Edit this page
View Source
Subnode
Subnodes are numbered as follows:
0 | 1
.
Declaration
protected Node<T>[] Subnode
Field Value
| Type |
Description |
| Node<T>[] |
|
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
Depth
Gets whether this node has any subnodes
Declaration
public int Depth { get; }
Property Value
|
Edit this page
View Source
HasChildren
Gets whether this node has any children
Declaration
public bool HasChildren { get; }
Property Value
|
Edit this page
View Source
HasItems
Declaration
public bool HasItems { get; }
Property Value
|
Edit this page
View Source
IsPrunable
Gets whether this node is prunable
Declaration
public bool IsPrunable { get; }
Property Value
|
Edit this page
View Source
Items
Declaration
public IList<T> Items { get; protected set; }
Property Value
| Type |
Description |
| IList<T> |
|
|
Edit this page
View Source
NodeCount
Declaration
public int NodeCount { get; }
Property Value
Methods
|
Edit this page
View Source
Add(T)
Declaration
Parameters
| Type |
Name |
Description |
| T |
item |
|
|
Edit this page
View Source
AddAllItems(IList<T>)
Declaration
public IList<T> AddAllItems(IList<T> items)
Parameters
| Type |
Name |
Description |
| IList<T> |
items |
|
Returns
| Type |
Description |
| IList<T> |
|
|
Edit this page
View Source
AddAllItemsFromOverlapping(Interval, ICollection<T>)
Adds items in the tree which potentially overlap the query interval
to the given collection.
If the query interval is null, add all items in the tree.
Declaration
public void AddAllItemsFromOverlapping(Interval interval, ICollection<T> resultItems)
Parameters
| Type |
Name |
Description |
| Interval |
interval |
A query interval, or null
|
| ICollection<T> |
resultItems |
The candidate items found
|
|
Edit this page
View Source
GetSubnodeIndex(Interval, double)
Returns the index of the subnode that wholely contains the given interval.
If none does, returns -1.
Declaration
public static int GetSubnodeIndex(Interval interval, double centre)
Parameters
Returns
|
Edit this page
View Source
IsSearchMatch(Interval)
Declaration
protected abstract bool IsSearchMatch(Interval interval)
Parameters
Returns
|
Edit this page
View Source
Remove(Interval, T)
Removes a single item from this subtree.
Declaration
public bool Remove(Interval itemInterval, T item)
Parameters
| Type |
Name |
Description |
| Interval |
itemInterval |
The envelope containing the item
|
| T |
item |
The item to remove
|
Returns
| Type |
Description |
| bool |
true if the item was found and removed
|