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

◆ copy()

res2term * res2_poly::copy ( const res2term * f) const

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

78{
79 res2term head;
80 res2term *result = &head;
81 for (const res2term *tm = f; tm != nullptr; tm = tm->next)
82 {
83 result->next = new_term();
84 result = result->next;
85 result->comp = tm->comp;
86 result->coeff = K->copy(tm->coeff);
87 M->copy(tm->monom, result->monom);
88 }
89 result->next = nullptr;
90 return head.next;
91}
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().