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

◆ monomToModuleMonom()

ModuleMonom monomToModuleMonom ( const Monom & a,
int comp,
std::pair< int *, int * > allocated_result )
inline

Definition at line 187 of file Polynomial.hpp.

188{
189 assert(allocated_result.second-allocated_result.first >= ModuleMonom::sizeOfCorrespondingModuleMonom(a));
190 auto begin = allocated_result.first;
192 begin[1] = 0; // index
193 begin[2] = 0; // hashval
194 begin[3] = comp;
195 std::copy(a.begin()+1, a.end(), begin+4);
196 return ModuleMonom(begin);
197}
static int sizeOfCorrespondingModuleMonom(const Monom &m)
Monom extended with a module component, a stored index, and a memoised hash — the value type of IntsS...
TermIterator< Nterm > begin(Nterm *ptr)
Definition ringelem.cpp:4
const int * end() const
const int * begin() const

References begin(), Monom::begin(), Monom::end(), and ModuleMonom::sizeOfCorrespondingModuleMonom().

Referenced by IntsSet< ModuleMonomDefaultConfig >::find(), and IntsSet< ModuleMonomDefaultConfig >::insert().