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

◆ copy()

resterm * res_poly::copy ( const resterm * f) const

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

61{
62 resterm head;
63 resterm *result = &head;
64 for (const resterm *tm = f; tm != nullptr; tm = tm->next)
65 {
66 result->next = new_term();
67 result = result->next;
68 result->comp = tm->comp;
69 result->coeff = K->copy(tm->coeff);
70 M->copy(tm->monom, result->monom);
71 }
72 result->next = nullptr;
73 return head.next;
74}
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().