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

◆ ring_mult_by_term()

resterm * res_poly::ring_mult_by_term ( const ring_elem f,
ring_elem c,
const int * m,
res_pair * x ) const

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

107{
108 resterm head;
109 resterm *result = &head;
110 for (Nterm& tm : f)
111 {
112 result->next = new_term();
113 result = result->next;
114 result->comp = x;
115 result->coeff = K->mult(c, tm.coeff);
116 M->mult(tm.monom, m, result->monom);
117 }
118 result->next = nullptr;
119 return head.next;
120}
const Ring * K
resterm * new_term() const
const Monoid * M
VALGRIND_MAKE_MEM_DEFINED & result(result)
volatile int x
resterm * next

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

Referenced by ring_subtract_multiple_to().