Macaulay2 Engine
Loading...
Searching...
No Matches
ResPolynomialIterator Class Reference

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 ResPolyRingmRing
const ResPolynomialelem
long coeff_index
long monom_index

Friends

bool operator== (const ResPolynomialIterator &a, const ResPolynomialIterator &b)
bool operator!= (const ResPolynomialIterator &a, const ResPolynomialIterator &b)

Detailed Description

Forward iterator over the terms of a ResPolynomial.

Note
AI-generated documentation. Verify against the source before relying on it.

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.


The documentation for this class was generated from the following file: