00001
00002
00014
00015
00016 #ifndef polybori_groebner_LiteralFactorizationIterator_h_
00017 #define polybori_groebner_LiteralFactorizationIterator_h_
00018
00019
00020 #include "groebner_defs.h"
00021 #include "LiteralFactorization.h"
00022
00023 #include <algorithm>
00024 #include <vector>
00025 #include <map>
00026 #include <set>
00027 #include <utility>
00028
00029 BEGIN_NAMESPACE_PBORIGB
00030
00031
00036 class LiteralFactorizationIterator{
00037 typedef LiteralFactorizationIterator self;
00038
00039 public:
00040 typedef LiteralFactorization fac_type;
00041 typedef fac_type::var2var_map_type var2var_map_type;
00042 typedef fac_type::map_type map_type;
00043
00044 LiteralFactorizationIterator(LiteralFactorization* literal_factorization_,
00045 map_type::const_iterator var2const_iter_,
00046 var2var_map_type::const_iterator
00047 var2var_iter_
00048 ):
00049 var2var_iter(var2var_iter_), var2const_iter(var2const_iter_),
00050 literal_factorization(literal_factorization_),
00051 m_ring(literal_factorization_->rest.ring()) { }
00052
00053
00054 self & operator++();
00055 Polynomial operator*() const;
00056
00057 bool operator==(const self& other){
00058 return ((literal_factorization==other.literal_factorization)
00059 && (var2const_iter==other.var2const_iter) &&
00060 (var2var_iter==other.var2var_iter)
00061 );
00062 }
00063 bool operator!=(const self& other){
00064 return !(*this==other);
00065 }
00066
00067 private:
00068 var2var_map_type::const_iterator var2var_iter;
00069 map_type::const_iterator var2const_iter;
00070
00071 const LiteralFactorization* literal_factorization;
00072 BoolePolyRing m_ring;
00073 };
00074
00075 END_NAMESPACE_PBORIGB
00076
00077 #endif