|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
A non-balanced tree implementation that can be referenced from many other trees. Because of that, there is no way to get back to the parent node. More...
Public Member Functions | |
| Tree (T value) | |
| Initializes a new instance of the Tree{T} class with no child nodes (Leaf) More... | |
| Tree (Tree< T > other, IEnumerable< Tree< T >> children) | |
| "Copy" constructor More... | |
| Tree (T value, IEnumerable< Tree< T >> children) | |
| Initializes a new instance of the Tree{T} class with the given parent and children More... | |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| string | ToString (int maxdepth) |
| override string | ToString () |
| bool | Equals (Tree< T > other) |
| int | CompareTo (Tree< T > other) |
| IEnumerator< T > | GetEnumerator () |
Properties | |
| int | Depth [get, set] |
| Maximum depth of the tree More... | |
| int | LeavesCount [get, set] |
| Number of leaves in the tree More... | |
| int | NodesCount [get, set] |
| Number of nodes in the tree More... | |
| T | Value [get, set] |
| The value of this node More... | |
| bool | IsLeaf [get] |
| Checks whether this node has no children More... | |
| IReadOnlyList< Tree< T > > | Children [get, set] |
| Tree's children More... | |
| DFSTreeEnumerator< T > | DepthFirstEnumerator [get] |
| Depth-First enumerator (stack based) More... | |
| BFSTreeEnumerator< T > | BreadthFirstEnumerator [get] |
| Breadth-First Enumerator (queue based) More... | |
| Tree< T > | this[int ix] [get] |
| Indexer returns the child More... | |
A non-balanced tree implementation that can be referenced from many other trees. Because of that, there is no way to get back to the parent node.
Example:
A | D
/ \ | / \
B C | B B
/ \ |
B B |
All "B" subtrees here may be the same instance of the Tree{T} class.
| T | The type of node values |
| Mercury.Nucleus.Trees.Tree< T >.Tree | ( | T | value | ) |
| Mercury.Nucleus.Trees.Tree< T >.Tree | ( | Tree< T > | other, |
| IEnumerable< Tree< T >> | children | ||
| ) |
| Mercury.Nucleus.Trees.Tree< T >.Tree | ( | T | value, |
| IEnumerable< Tree< T >> | children | ||
| ) |
| int Mercury.Nucleus.Trees.Tree< T >.CompareTo | ( | Tree< T > | other | ) |
| override bool Mercury.Nucleus.Trees.Tree< T >.Equals | ( | object | obj | ) |
| bool Mercury.Nucleus.Trees.Tree< T >.Equals | ( | Tree< T > | other | ) |
| IEnumerator<T> Mercury.Nucleus.Trees.Tree< T >.GetEnumerator | ( | ) |
| override int Mercury.Nucleus.Trees.Tree< T >.GetHashCode | ( | ) |
| string Mercury.Nucleus.Trees.Tree< T >.ToString | ( | int | maxdepth | ) |
| override string Mercury.Nucleus.Trees.Tree< T >.ToString | ( | ) |
|
get |
|
getset |
|
getset |
|
get |
|
get |
|
getset |
|
getset |
|
get |
|
getset |
1.8.7