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

◆ wordProductAsWord() [2/2]

Word FreeMonoid::wordProductAsWord ( const Word & left,
const Word & right,
MemoryBlock & memBlock ) const

Definition at line 359 of file FreeMonoid.cpp.

360{
361 int sz = left.size() + right.size();
362 auto rg = memBlock.allocateArray<int>(sz);
363 std::copy(left.begin(), left.end(), rg.first);
364 std::copy(right.begin(), right.end(), rg.first + left.size());
365 Word newword(rg.first, rg.second);
366 return newword;
367}
std::pair< T *, T * > allocateArray(size_t nelems)
const int * begin() const
Definition Word.hpp:72
const int * end() const
Definition Word.hpp:73
int size() const
Definition Word.hpp:74

References MemoryBlock::allocateArray(), Word::begin(), Word::end(), and Word::size().

Referenced by NCF4::preRowsFromOverlap(), and NCF4::processPreRow().