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

◆ allLeaves()

auto SuffixTree::allLeaves ( SuffixTreeNode * v,
std::vector< SuffixTreeNode * > & output ) const->void

Definition at line 441 of file SuffixTree.cpp.

442{
443 if (v->numChildren() == 0)
444 {
445 output.push_back(v);
446 return;
447 }
448 for (auto x = v->childrenBegin(); x != v->childrenEnd(); ++x)
449 {
450 allLeaves(x->second,output);
451 }
452 return;
453}
auto allLeaves(SuffixTreeNode *v, std::vector< SuffixTreeNode * > &output) const -> void
std::map< Label, SuffixTreeNode * >::iterator childrenEnd()
size_t numChildren() const
std::map< Label, SuffixTreeNode * >::iterator childrenBegin()
volatile int x

References allLeaves(), and x.

Referenced by allLeaves(), and superwords().