Macaulay2 Engine
Loading...
Searching...
No Matches

◆ SuffixTreeNode() [2/2]

SuffixTreeNode::SuffixTreeNode ( SuffixTreeNode * parent,
Word arcLabel,
bool isFullPattern )
inline

Definition at line 94 of file SuffixTree.hpp.

96 :
98 mChildren(std::map<Label,SuffixTreeNode*> {}),
99 mSuffixLink(nullptr),
102 {
103 // copy the data in arcLabel to a label owned by the node
104 for (auto i = 0; i < arcLabel.size(); ++i)
105 {
106 mArcLabel.push_back(arcLabel.begin()[i]);
107 }
108
109 // build the label of the node from the label of the parent and the arc label
110 mLabel.insert(mLabel.begin(),parent->label().begin(),parent->label().end());
111 mLabel.insert(mLabel.end(),mArcLabel.begin(),mArcLabel.end());
112 parent->addChild(this);
113 }
SuffixTreeNode * parent()
Label & arcLabel()
bool isFullPattern() const
SuffixTreeNode * mParent
SuffixTreeNode * mSuffixLink
std::map< Label, SuffixTreeNode * > mChildren

References arcLabel(), isFullPattern(), mChildren, mParent, parent(), and SuffixTreeNode().