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

◆ createOverlapLeadWord()

Word NCF4::createOverlapLeadWord ( const Overlap & o)
private

Definition at line 301 of file NCF4.cpp.

302{
303 // this function adds the return value to mMemoryBlock, so should only be used
304 // when running a GB since it will be subsequently cleared.
305 Word left(mWordTable[std::get<0>(o)].begin(),
306 mWordTable[std::get<0>(o)].begin()+std::get<1>(o));
307 Word right = mWordTable[std::get<2>(o)];
308 int sz = left.size() + right.size();
309 auto rg = mMonomialSpace.allocateArray<int>(sz);
310 std::copy(left.begin(),left.end(),rg.first);
311 std::copy(right.begin(),right.end(),rg.first+left.size());
312 return Word(rg.first, rg.second);
313}
WordTable mWordTable
Definition NCF4.hpp:219
MemoryBlock mMonomialSpace
Definition NCF4.hpp:228
const int * begin() const
Definition Word.hpp:72
const int * end() const
Definition Word.hpp:73
int size() const
Definition Word.hpp:74
TermIterator< Nterm > begin(Nterm *ptr)
Definition ringelem.cpp:4

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

Referenced by checkOldOverlaps(), and isOverlapNecessary().