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

◆ content() [2/2]

ring_elem PolyRing::content ( ring_elem f,
ring_elem g ) const
virtual

Reimplemented from Ring.

Definition at line 2209 of file poly.cpp.

2210{
2211 Nterm *t = f;
2212 if (t == nullptr) return K_->zero();
2213 ring_elem c = t->coeff;
2214 for (t = t->next; t != nullptr; t = t->next) K_->lower_content(c, t->coeff);
2215 for (t = g; t != nullptr; t = t->next) K_->lower_content(c, t->coeff);
2216 return c;
2217}
const Ring * K_
Definition polyring.hpp:123
Nterm * next
Definition ringelem.hpp:157
ring_elem coeff
Definition ringelem.hpp:158

References Nterm::coeff, PolynomialRing::K_, and Nterm::next.