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

◆ ring_mult_by_term()

res2term * res2_poly::ring_mult_by_term ( const ring_elem f,
ring_elem c,
const int * m,
res2_pair * x ) const

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

124{
125 res2term head;
126 res2term *result = &head;
127 for (Nterm& tm : f)
128 {
129 result->next = new_term();
130 result = result->next;
131 result->comp = x;
132 result->coeff = K->mult(c, tm.coeff);
133 M->mult(tm.monom, m, result->monom);
134 }
135 result->next = nullptr;
136 return head.next;
137}
const Monoid * M
const Ring * K
res2term * new_term() const
VALGRIND_MAKE_MEM_DEFINED & result(result)
volatile int x
res2term * next

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

Referenced by ring_subtract_multiple_to().