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

◆ mult_by_term()

res2term * res2_poly::mult_by_term ( const res2term * f,
ring_elem c,
const int * m ) const

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

106{
107 res2term head;
108 res2term *result = &head;
109 for (const res2term *tm = f; tm != nullptr; tm = tm->next)
110 {
111 result->next = new_term();
112 result = result->next;
113 result->comp = tm->comp;
114 result->coeff = K->mult(c, tm->coeff);
115 M->mult(tm->monom, m, result->monom);
116 }
117 result->next = nullptr;
118 return head.next;
119}
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().

Referenced by subtract_multiple_to().