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

◆ insert() [2/2]

size_t WordTable::insert ( Word w,
std::vector< Overlap > & newRightOverlaps )

Definition at line 27 of file WordTable.cpp.

28{
29 // we are making a copy of the word, since the pointers
30 // to the GB elements may change during autoreduction.
31 auto newW = mMonomialSpace.allocateArray<int>(w.size());
32 std::copy(w.begin(),w.end(),newW.first);
33 mMonomials.push_back(Word(newW.first,newW.second));
34 rightOverlaps(newRightOverlaps); // find (right) overlaps with most recent added word 'w'.
35 return mMonomials.size();
36}
const int * begin() const
Definition Word.hpp:72
const int * end() const
Definition Word.hpp:73
int size() const
Definition Word.hpp:74
void rightOverlaps(std::vector< Overlap > &newRightOverlaps) const
std::vector< Word > mMonomials
MemoryBlock mMonomialSpace

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