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

◆ isPrefix()

bool WordWithDataTable::isPrefix ( WordWithData word,
int & output ) const

Definition at line 392 of file WordTable.cpp.

394{
395 for (auto i = 0; i < mMonomials.size(); ++i)
396 {
397 if (mIndices[i] == -1) continue;
398 if (isPrefixOf(mMonomials[i], word))
399 {
400 output = i;
401 return true;
402 }
403 }
404 return false;
405}
std::vector< int > word
std::vector< int > mIndices
static bool isPrefixOf(WordWithData word1, WordWithData word2)
std::vector< WordWithData > mMonomials

References isPrefixOf(), mIndices, mMonomials, and word.