15 #ifndef polybori_iterators_CTermIter_h_
16 #define polybori_iterators_CTermIter_h_
29 #include <boost/iterator/iterator_facade.hpp>
43 template <
class StackType,
class TermGeneratorType>
45 public boost::iterator_facade<
46 CTermIter<StackType, TermGeneratorType>,
47 typename TermGeneratorType::value_type,
48 typename StackType::iterator_category,
49 typename TermGeneratorType::result_type
78 typedef typename stack_type::const_reverse_iterator
84 m_getTerm(rhs.m_getTerm), m_stack(rhs.m_stack) {
88 template <
class MgrType>
90 m_getTerm(mgr), m_stack(navi, mgr) {
109 return m_stack.equal(rhs.
m_stack);
114 return m_getTerm(m_stack);
119 const_iterator
begin()
const {
return m_stack.begin(); }
120 const_iterator
end()
const {
return m_stack.end(); }
126 bool_type
isOne()
const {
return m_stack.isOne(); }
129 bool_type
isZero()
const {
return m_stack.isZero(); }
132 bool_type
isEnd()
const {
return isZero(); }
135 deg_type
deg()
const {
return m_stack.deg(); }
145 return m_stack.navigation();
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
void increment()
Incrementation operation.
Definition: CTermIter.h:98
StackType stack_type
Define type for storing current path (term) in stack of nodes.
Definition: CTermIter.h:55
int deg_type
Definition: groebner_defs.h:42
bool_type isEnd() const
Check, whether end of iteration is reached.
Definition: CTermIter.h:132
CTermIter(const CTermIter &rhs)
Copy constructor.
Definition: CTermIter.h:83
stack_type m_stack
The stack, which carries the current path.
Definition: CTermIter.h:153
bool_type isZero() const
Determine whether term is zero (without explicit constructing)
Definition: CTermIter.h:129
navigator navigation() const
Get navigator of term start.
Definition: CTermIter.h:144
idx_type firstIndex() const
Get first index of current term.
Definition: CTermIter.h:138
deg_type deg() const
Get degree of current term.
Definition: CTermIter.h:135
navigator::size_type size_type
Type for lengths.
Definition: CTermIter.h:67
~CTermIter()
Destructor.
Definition: CTermIter.h:95
navigator::idx_type idx_type
Type for indices.
Definition: CTermIter.h:61
This class defines an iterator for the monomials in a Boolean polynomial.
Definition: CTermIter.h:44
stack_type::navigator navigator
Get type of navigators.
Definition: CTermIter.h:58
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
bool_type equal(const CTermIter &rhs) const
Equality test.
Definition: CTermIter.h:108
navigator::bool_type bool_type
Type for Boolean results.
Definition: CTermIter.h:64
term_generator m_getTerm
The functional which defines the dereferecing operation.
Definition: CTermIter.h:150
const_iterator end() const
Definition: CTermIter.h:120
void decrement()
Decrementation operation.
Definition: CTermIter.h:103
const_reverse_iterator rbegin() const
Definition: CTermIter.h:121
CTermIter(navigator navi, const MgrType &mgr)
Construct from navigator over decision diagram.
Definition: CTermIter.h:89
term_generator::result_type dereference() const
Dereferencing of the iterator.
Definition: CTermIter.h:113
polybori::CTypes::idx_type idx_type
Definition: groebner_defs.h:44
TermGeneratorType term_generator
Type for functional, which generates actual term, for current path.
Definition: CTermIter.h:73
navigator::deg_type deg_type
Type for degrees.
Definition: CTermIter.h:70
const_reverse_iterator rend() const
Definition: CTermIter.h:122
bool_type isOne() const
Determine whether term is one (without explicit constructing)
Definition: CTermIter.h:126
stack_type::const_iterator const_iterator
Definition: CTermIter.h:77
stack_type::const_reverse_iterator const_reverse_iterator
Definition: CTermIter.h:79
const_iterator begin() const
Definition: CTermIter.h:119