LiteralFactorizationIterator.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_LiteralFactorizationIterator_h_
#define polybori_groebner_LiteralFactorizationIterator_h_
// include basic definitions
#include "groebner_defs.h"
#include "LiteralFactorization.h"
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <utility>
BEGIN_NAMESPACE_PBORIGB
class LiteralFactorizationIterator{
typedef LiteralFactorizationIterator self;
public:
typedef LiteralFactorization fac_type;
typedef fac_type::var2var_map_type var2var_map_type;
typedef fac_type::map_type map_type;
LiteralFactorizationIterator(LiteralFactorization* literal_factorization_,
map_type::const_iterator var2const_iter_,
var2var_map_type::const_iterator
var2var_iter_
):
var2var_iter(var2var_iter_), var2const_iter(var2const_iter_),
literal_factorization(literal_factorization_),
m_ring(literal_factorization_->rest.ring()) { }
self & operator++();
Polynomial operator*() const;
bool operator==(const self& other){
return ((literal_factorization==other.literal_factorization)
&& (var2const_iter==other.var2const_iter) &&
(var2var_iter==other.var2var_iter)
);
}
bool operator!=(const self& other){
return !(*this==other);
}
private:
var2var_map_type::const_iterator var2var_iter;
map_type::const_iterator var2const_iter;
const LiteralFactorization* literal_factorization;
BoolePolyRing m_ring;
};
END_NAMESPACE_PBORIGB
#endif /* polybori_groebner_LiteralFactorizationIterator_h_ */
polybori::groebner::LiteralFactorizationIterator
This class defines LiteralFactorizationIterator.
Definition: LiteralFactorizationIterator.h:36
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::groebner::LiteralFactorization
Definition: LiteralFactorization.h:24
polybori::groebner::LiteralFactorizationIterator::var2var_map_type
fac_type::var2var_map_type var2var_map_type
Definition: LiteralFactorizationIterator.h:41
polybori::groebner::LiteralFactorizationIterator::LiteralFactorizationIterator
LiteralFactorizationIterator(LiteralFactorization *literal_factorization_, map_type::const_iterator var2const_iter_, var2var_map_type::const_iterator var2var_iter_)
Definition: LiteralFactorizationIterator.h:44
polybori::BoolePolyRing
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::LiteralFactorizationIterator::fac_type
LiteralFactorization fac_type
Definition: LiteralFactorizationIterator.h:40
polybori::groebner::LiteralFactorization::map_type
std::map< idx_type, int > map_type
Definition: LiteralFactorization.h:30
polybori::BoolePolynomial
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
groebner_defs.h
polybori::groebner::LiteralFactorizationIterator::operator==
bool operator==(const self &other)
Definition: LiteralFactorizationIterator.h:57
polybori::groebner::LiteralFactorizationIterator::operator!=
bool operator!=(const self &other)
Definition: LiteralFactorizationIterator.h:63
LiteralFactorization.h
polybori::groebner::LiteralFactorizationIterator::map_type
fac_type::map_type map_type
Definition: LiteralFactorizationIterator.h:42
polybori::operator*
BooleConstant operator*(const BooleConstant &lhs, const BooleConstant &rhs)
Definition: BooleConstant.h:124
polybori::groebner::LiteralFactorization::var2var_map_type
std::map< idx_type, idx_type > var2var_map_type
Definition: LiteralFactorization.h:42