• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

COrderBase.h

Go to the documentation of this file.
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::idx_type idx_type;
00118 
00120   typedef BooleMonomial monom_type;
00121 
00122   typedef BoolePolynomial::navigator navigator;
00123 
00124   typedef COrderedIter<navigator, monom_type> indirect_iterator;
00125 
00127   typedef BooleSet set_type;
00128 
00130   typedef BooleExponent exp_type;
00131 
00132   typedef COrderedIter<navigator, exp_type> indirect_exp_iterator;
00133 
00135   typedef std::vector<idx_type> block_idx_type;
00136 
00138   typedef block_idx_type::const_iterator block_iterator;
00139 
00141 
00142   typedef invalid_tag lex_property; 
00143   typedef invalid_tag ordered_property;
00144   typedef invalid_tag symmetry_property;
00145   typedef invalid_tag degorder_property;
00146   typedef invalid_tag blockorder_property;
00147   typedef invalid_tag degrevlexorder_property; 
00148   typedef invalid_tag totaldegorder_property;
00149   typedef invalid_tag ascending_property;
00150   typedef invalid_tag descending_property;
00152 
00154   COrderBase() {};
00155 
00157   COrderBase(const COrderBase&) {};
00158 
00160   virtual ~COrderBase() {};
00161 
00163   virtual comp_type compare(idx_type, idx_type) const = 0;
00164 
00166   virtual comp_type compare(const monom_type&, const monom_type&) const = 0;
00167 
00169   virtual comp_type compare(const exp_type&, const exp_type&) const = 0;
00170 
00172   virtual monom_type lead(const poly_type&) const = 0;
00173 
00175   virtual monom_type lead(const poly_type&, size_type) const = 0;
00176 
00178   virtual exp_type leadExp(const poly_type&) const = 0;
00179 
00181   virtual exp_type leadExp(const poly_type&, size_type) const = 0;
00182 
00184   virtual indirect_iterator leadIteratorBegin(const poly_type&) const = 0;
00185   virtual indirect_iterator leadIteratorEnd() const = 0;
00186   virtual indirect_exp_iterator leadExpIteratorBegin(const poly_type&) const = 0;
00187   virtual indirect_exp_iterator leadExpIteratorEnd() const = 0;
00188 
00190 
00191   virtual block_iterator blockBegin() const { return block_iterator(); }
00192   virtual block_iterator blockEnd() const { return block_iterator(); }
00193   virtual void appendBlock(idx_type) const { }
00194   virtual void clearBlocks() const { }
00196 
00197 
00198 protected:
00200   monom_type monom(const set_type& rhs) const { return monom_type(rhs); }
00201 };
00202 
00203 END_NAMESPACE_PBORI
00204 
00205 #endif

Generated on Thu Nov 4 2010 08:06:21 for PolyBoRi by  doxygen 1.7.1