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

◆ mult_by_term()

resterm * res_poly::mult_by_term ( const resterm * f,
ring_elem c,
const int * m ) const

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

89{
90 resterm head;
91 resterm *result = &head;
92 for (const resterm *tm = f; tm != nullptr; tm = tm->next)
93 {
94 result->next = new_term();
95 result = result->next;
96 result->comp = tm->comp;
97 result->coeff = K->mult(c, tm->coeff);
98 M->mult(tm->monom, m, result->monom);
99 }
100 result->next = nullptr;
101 return head.next;
102}
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().

Referenced by subtract_multiple_to().