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

◆ isNontrivialSuperword()

auto SuffixTree::isNontrivialSuperword ( const Word & word,
int index1,
int index2 ) const->bool

Definition at line 679 of file SuffixTree.cpp.

680{
681 //Label tmp(word.begin(),word.end());
682 std::vector<std::pair<int,int>> subs {};
683 subwords(word, subs);
684 for (auto sw : subs)
685 {
686 auto index = std::get<0>(sw);
687 auto pos = std::get<1>(sw);
688 if (index != index1 && index != index2) return true;
689 if (index != index1 && pos == 0) return true;
690 if (index != index2 && pos == word.size() - mMonomials[index2].size()) return true;
691 }
692 return false;
693}
std::vector< int > word
bool subwords(const Word &word, std::vector< std::pair< int, int > > &output) const
std::vector< Label > mMonomials

References mMonomials, subwords(), and word.