Macaulay2 Engine
Loading...
Searching...
No Matches
SuffixTreeNode Class Reference

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)
SuffixTreeNodeparent ()
SuffixTreeNodesuffixLink ()
LabelarcLabel ()
Labellabel ()
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 SuffixTreeNodebuildRoot ()

Private Attributes

SuffixTreeNodemParent
std::map< Label, SuffixTreeNode * > mChildren
SuffixTreeNodemSuffixLink
bool mIsFullPattern
int mPatternLeafCount
Label mArcLabel
Label mLabel

Friends

std::ostream & operator<< (std::ostream &o, const SuffixTreeNode &suffixTreeNode)

Detailed Description

One node of a generalised suffix tree built over the inserted non-commutative monomial patterns.

Note
AI-generated documentation. Verify against the source before relying on it.

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.


The documentation for this class was generated from the following files: