00001 // -*- c++ -*- 00002 //***************************************************************************** 00069 //***************************************************************************** 00070 00071 // include basic definitions 00072 #include "pbori_defs.h" 00073 00074 // include basic definitions for orderings 00075 #include "pbori_tags.h" 00076 00077 // include polynomial definitions 00078 #include "BoolePolynomial.h" 00079 00080 // include monomial definitions 00081 #include "BooleMonomial.h" 00082 00083 // include exponent vector definitions 00084 #include "BooleExponent.h" 00085 00086 #include "COrderedIter.h" 00087 00088 #ifndef COrderBase_h_ 00089 #define COrderBase_h_ 00090 00091 BEGIN_NAMESPACE_PBORI 00092 00093 00099 class COrderBase: 00100 public CTypes::auxtypes_type { 00101 00102 public: 00103 //------------------------------------------------------------------------- 00104 // types definitions 00105 //------------------------------------------------------------------------- 00106 00108 typedef COrderBase base; 00109 00111 typedef BoolePolynomial poly_type; 00112 00114 typedef poly_type::size_type size_type; 00115 00117 typedef poly_type::deg_type deg_type; 00118 00120 typedef poly_type::idx_type idx_type; 00121 00123 typedef BooleMonomial monom_type; 00124 00125 typedef BoolePolynomial::navigator navigator; 00126 00127 typedef COrderedIter<navigator, monom_type> indirect_iterator; 00128 00130 typedef BooleSet set_type; 00131 00133 typedef BooleExponent exp_type; 00134 00135 typedef COrderedIter<navigator, exp_type> indirect_exp_iterator; 00136 00138 typedef std::vector<idx_type> block_idx_type; 00139 00141 typedef block_idx_type::const_iterator block_iterator; 00142 00144 00145 typedef invalid_tag lex_property; 00146 typedef invalid_tag ordered_property; 00147 typedef invalid_tag symmetry_property; 00148 typedef invalid_tag degorder_property; 00149 typedef invalid_tag blockorder_property; 00150 typedef invalid_tag degrevlexorder_property; 00151 typedef invalid_tag totaldegorder_property; 00152 typedef invalid_tag ascending_property; 00153 typedef invalid_tag descending_property; 00155 00157 COrderBase() {}; 00158 00160 COrderBase(const COrderBase&) {}; 00161 00163 virtual ~COrderBase() {}; 00164 00166 virtual comp_type compare(idx_type, idx_type) const = 0; 00167 00169 virtual comp_type compare(const monom_type&, const monom_type&) const = 0; 00170 00172 virtual comp_type compare(const exp_type&, const exp_type&) const = 0; 00173 00175 virtual monom_type lead(const poly_type&) const = 0; 00176 00178 virtual monom_type lead(const poly_type&, deg_type) const = 0; 00179 00181 virtual exp_type leadExp(const poly_type&) const = 0; 00182 00184 virtual exp_type leadExp(const poly_type&, deg_type) const = 0; 00185 00187 virtual indirect_iterator leadIteratorBegin(const poly_type&) const = 0; 00188 virtual indirect_iterator leadIteratorEnd() const = 0; 00189 virtual indirect_exp_iterator leadExpIteratorBegin(const poly_type&) const = 0; 00190 virtual indirect_exp_iterator leadExpIteratorEnd() const = 0; 00191 00193 00194 virtual block_iterator blockBegin() const { return block_iterator(); } 00195 virtual block_iterator blockEnd() const { return block_iterator(); } 00196 virtual void appendBlock(idx_type) const { } 00197 virtual void clearBlocks() const { } 00199 00200 00201 protected: 00203 monom_type monom(const set_type& rhs) const { return monom_type(rhs); } 00204 }; 00205 00206 END_NAMESPACE_PBORI 00207 00208 #endif