Class BinaryTree<T, TU>
The BinaryTree class are used for indexing values to enhance the speed of queries
Inherited Members
Namespace: Mapsui.Nts.Providers.Shapefile.Indexing
Assembly: Mapsui.Nts.dll
Syntax
[Serializable]
public class BinaryTree<T, TU> where T : IComparable<T?>
Type Parameters
| Name | Description |
|---|---|
| T | Value type to be indexed |
| TU | Value ID type |
Constructors
| Edit this page View SourceBinaryTree()
Initializes a new instance of the generic binary tree.
Declaration
public BinaryTree()
Properties
| Edit this page View SourceInOrder
Gets an enumerator for all the values in the tree in ascending order
Declaration
public IEnumerable<BinaryTree<T, TU>.ItemValue> InOrder { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<BinaryTree<T, TU>.ItemValue> |
Methods
| Edit this page View SourceAdd(ItemValue)
Inserts a value into the tree
Declaration
public void Add(BinaryTree<T, TU>.ItemValue item)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryTree<T, TU>.ItemValue | item |
Add(params ItemValue[])
Inserts a value into the tree
Declaration
public void Add(params BinaryTree<T, TU>.ItemValue[] items)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemValue[] | items |
Between(T, T)
Gets and enumerator for the values between min and max in ascending order
Declaration
public IEnumerable<BinaryTree<T, TU>.ItemValue> Between(T min, T max)
Parameters
| Type | Name | Description |
|---|---|---|
| T | min | |
| T | max |
Returns
| Type | Description |
|---|---|
| IEnumerable<BinaryTree<T, TU>.ItemValue> | Enumerator |
Find(T)
Enumerates all objects with the specified value
Declaration
public IEnumerable<BinaryTree<T, TU>.ItemValue> Find(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | Value to search for |
Returns
| Type | Description |
|---|---|
| IEnumerable<BinaryTree<T, TU>.ItemValue> | Enumerator |
StartsWith(string)
Enumerates the objects whose string-representation starts with 'str'
Declaration
public IEnumerable<BinaryTree<T, TU>.ItemValue> StartsWith(string str)
Parameters
| Type | Name | Description |
|---|---|---|
| string | str |
Returns
| Type | Description |
|---|---|
| IEnumerable<BinaryTree<T, TU>.ItemValue> | Enumerator |
TraceTree()
This is the classic computer science binary tree iteration
Declaration
public void TraceTree()