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

◆ insert() [1/2]

size_t WordTable::insert ( Word w)

Definition at line 17 of file WordTable.cpp.

18{
19 // we are making a copy of the word, since the pointers
20 // to the GB elements may change during autoreduction.
21 auto newW = mMonomialSpace.allocateArray<int>(w.size());
22 std::copy(w.begin(),w.end(),newW.first);
23 mMonomials.push_back(Word(newW.first,newW.second));
24 return mMonomials.size();
25}
const int * begin() const
Definition Word.hpp:72
const int * end() const
Definition Word.hpp:73
int size() const
Definition Word.hpp:74
std::vector< Word > mMonomials
MemoryBlock mMonomialSpace

References Word::begin(), Word::end(), mMonomials, mMonomialSpace, and Word::size().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().