Class SuffixTrieNode
An immutable node of an immutable Suffix Trie, recursively pointing to its children nodes via SuffixTrieEdge instances, associated with selector characters.
Implements
Inherited Members
Namespace: MoreStructures.SuffixTries
Assembly: MoreStructures.dll
Syntax
public abstract class SuffixTrieNode : ISuffixStructureNode<SuffixTrieEdge, SuffixTrieNode>, IRecImmDictIndexedTreeNode<SuffixTrieEdge, SuffixTrieNode>, IEquatable<SuffixTrieNode>
Remarks
ADVANTAGES AND DISADVANTAGES
Compare to suffix trees, suffix tries, although less performant and optimized on many operations, are simpler
to build, navigate and understand.
IMMUTABILITY
Immutability is guaranteed by using ValueReadOnlyCollection<T>.
Constructors
| Improve this Doc View SourceSuffixTrieNode(IDictionary<SuffixTrieEdge, SuffixTrieNode>, Nullable<Int32>)
An immutable node of an immutable Suffix Trie, recursively pointing to its children nodes via SuffixTrieEdge instances, associated with selector characters.
Declaration
protected SuffixTrieNode(IDictionary<SuffixTrieEdge, SuffixTrieNode> Children, int? Start)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<SuffixTrieEdge, SuffixTrieNode> | Children | The collection of children for the node, indexed by single char edges. |
System.Nullable<System.Int32> | Start |
Remarks
ADVANTAGES AND DISADVANTAGES
Compare to suffix trees, suffix tries, although less performant and optimized on many operations, are simpler
to build, navigate and understand.
IMMUTABILITY
Immutability is guaranteed by using ValueReadOnlyCollection<T>.
Properties
| Improve this Doc View SourceChildren
A readonly view of the children private collection of this node. Empty for leaves.
Declaration
public IDictionary<SuffixTrieEdge, SuffixTrieNode> Children { get; }
Property Value
Type | Description |
---|---|
IDictionary<SuffixTrieEdge, SuffixTrieNode> |
Item[SuffixTrieEdge]
Indexes into the children of this node, by edge, which is a single char selector.
Declaration
public SuffixTrieNode this[SuffixTrieEdge edge] { get; }
Parameters
Type | Name | Description |
---|---|---|
SuffixTrieEdge | edge |
Property Value
Type | Description |
---|---|
SuffixTrieNode |
Start
The index of the character, the path from the root leading to this leaf starts with. Non-null for leaves only.
Declaration
public int? Start { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Methods
| Improve this Doc View SourceToString()
Uses a IStringifier<TEdge, TNode> to generate the string which show the node and its
underlying structure.
Declaration
public sealed override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Remarks
Sealed to prevent compiler from superceding ToString() in derived record.