|
Macaulay2 Engine
|
Forward iterator over the terms of a ResPolynomial. More...
#include <res-poly-ring.hpp>
Public Member Functions | |
| ResPolynomialIterator (const ResPolyRing &R, const ResPolynomial &elem0) | |
| ResPolynomialIterator (const ResPolyRing &R, const ResPolynomial &elem0, int) | |
| int | coefficient_index () const |
| res_const_packed_monomial | monomial () const |
| void | operator++ () |
Private Attributes | |
| const ResPolyRing & | mRing |
| const ResPolynomial & | elem |
| long | coeff_index |
| long | monom_index |
Friends | |
| bool | operator== (const ResPolynomialIterator &a, const ResPolynomialIterator &b) |
| bool | operator!= (const ResPolynomialIterator &a, const ResPolynomialIterator &b) |
Forward iterator over the terms of a ResPolynomial.
Carries two cursors: coeff_index ticks through elem.coeffs one per term, and monom_index walks the flat elem.monoms buffer in monomial-size strides (ResMonoid::monomial_size), which is variable when monomials are not fixed-width. Equality compares the coefficient index only — the "end" iterator pins it to elem.len.
Definition at line 242 of file res-poly-ring.hpp.