|
Macaulay2 Engine
|
One node of a generalised suffix tree built over the inserted non-commutative monomial patterns. More...
#include <SuffixTree.hpp>
Public Member Functions | |
| std::ostream & | dump (std::ostream &, int depth, bool dumpChildren=true) const |
| SuffixTreeNode () | |
| SuffixTreeNode (SuffixTreeNode *parent, Word arcLabel, bool isFullPattern) | |
| SuffixTreeNode * | parent () |
| SuffixTreeNode * | suffixLink () |
| Label & | arcLabel () |
| Label & | label () |
| int | patternLeafCount () const |
| bool | isFullPattern () const |
| bool | isLeaf () const |
| std::map< Label, SuffixTreeNode * >::iterator | childrenBegin () |
| std::map< Label, SuffixTreeNode * >::iterator | childrenEnd () |
| size_t | numChildren () const |
| void | setParent (SuffixTreeNode *newParent) |
| void | setSuffixLink (SuffixTreeNode *newSuffixLink) |
| void | removeChild (const Label &child) |
| void | addChild (SuffixTreeNode *child) |
| void | dropFromArcLabel (int toDrop) |
| void | addToPatternLeafCount (bool doIncrement) |
| void | setPatternLeafCount (int newPatternLeafCount) |
| int | getPatternNumber () const |
| auto | getChild (Label &s) -> SuffixTreeNode * |
Static Public Member Functions | |
| static SuffixTreeNode * | buildRoot () |
Private Attributes | |
| SuffixTreeNode * | mParent |
| std::map< Label, SuffixTreeNode * > | mChildren |
| SuffixTreeNode * | mSuffixLink |
| bool | mIsFullPattern |
| int | mPatternLeafCount |
| Label | mArcLabel |
| Label | mLabel |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const SuffixTreeNode &suffixTreeNode) |
One node of a generalised suffix tree built over the inserted non-commutative monomial patterns.
Holds its parent pointer, a std::map<Label, SuffixTreeNode*> of children keyed by the first symbol of each outgoing arc, the Ukkonen-style suffix link, the arc label (mArcLabel), and the full path label from the root (mLabel). mIsFullPattern marks the node as corresponding to a complete inserted pattern (vs. just a suffix of one) and mPatternLeafCount caches how many pattern leaves descend from it for fast subtree summaries. Leaves encode their pattern index as the final negative integer in mLabel, decoded by getPatternNumber().
Definition at line 76 of file SuffixTree.hpp.