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

◆ mult_by_monomial()

resterm * res_poly::mult_by_monomial ( const resterm * f,
const int * m ) const

Definition at line 44 of file res-a1-poly.cpp.

45{
46 resterm head;
47 resterm *result = &head;
48 for (const resterm *tm = f; tm != nullptr; tm = tm->next)
49 {
50 result->next = new_term();
51 result = result->next;
52 result->comp = tm->comp;
53 result->coeff = K->copy(tm->coeff);
54 M->mult(tm->monom, m, result->monom);
55 }
56 result->next = nullptr;
57 return head.next;
58}
const Ring * K
resterm * new_term() const
const Monoid * M
VALGRIND_MAKE_MEM_DEFINED & result(result)
resterm * next

References K, M, new_term(), resterm::next, and result().