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

◆ isPrefix()

bool WordTable::isPrefix ( Word word,
int & output ) const

Definition at line 133 of file WordTable.cpp.

135{
136 for (auto i = 0; i < mMonomials.size(); ++i)
137 {
138 if (isPrefixOf(mMonomials[i], word))
139 {
140 output = i;
141 return true;
142 }
143 }
144 return false;
145}
std::vector< int > word
std::vector< Word > mMonomials
static bool isPrefixOf(Word word1, Word word2)
Definition WordTable.cpp:86

References isPrefixOf(), mMonomials, and word.

Referenced by TEST().