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

◆ mult_by_monomial()

res2term * res2_poly::mult_by_monomial ( const res2term * f,
const int * m ) const

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

45{
46 res2term head;
47 res2term *result = &head;
48 for (const res2term *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 Monoid * M
const Ring * K
res2term * new_term() const
VALGRIND_MAKE_MEM_DEFINED & result(result)
res2term * next

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