Macaulay2 Engine
Loading...
Searching...
No Matches
MonomialIdeal::Iterator Class Reference

Bidirectional forward iterator over the Bags stored in a MonomialIdeal. More...

#include <monideal.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
using difference_type = std::ptrdiff_t
using value_type = Bag
using pointer = Bag*
using reference = Bag&

Public Member Functions

 Iterator (const MonomialIdeal &MI)
 Iterator (const MonomialIdeal &MI, int)
 Iterator (const MonomialIdeal &MI, Nmi_node *p)
reference operator* () const
pointer operator-> ()
Iteratoroperator++ ()
Iteratoroperator-- ()
Iterator operator++ (int)
Iterator operator-- (int)

Private Attributes

const MonomialIdealmMonomialTable
Nmi_nodemPointer

Friends

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

Detailed Description

Bidirectional forward iterator over the Bags stored in a MonomialIdeal.

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

Walks the Nmi_node tree in lex order via MonomialIdeal::next / prev. operator* returns the Bag& at the current leaf; operator-> returns the underlying pointer. Equality is by raw node-pointer comparison, so the end iterator is just the one with mPointer == nullptr.

Definition at line 230 of file monideal.hpp.


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