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

BlockDegLexOrder.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //*****************************************************************************
00042 //*****************************************************************************
00043 
00044 // include basic definitions
00045 #include "pbori_defs.h"
00046 
00047 // include base order definitions
00048 #include "COrderBase.h"
00049 
00050 #ifndef BlockDegLexOrder_h_
00051 #define BlockDegLexOrder_h_
00052 
00053 BEGIN_NAMESPACE_PBORI
00054 
00060 class BlockDegLexOrder:
00061   public COrderBase {
00062 
00063  public:
00064   //-------------------------------------------------------------------------
00065   // types definitions
00066   //-------------------------------------------------------------------------
00067 
00069   typedef BlockDegLexOrder self;
00070 
00072 
00073   typedef valid_tag blockorder_property;
00074   typedef valid_tag descending_property;
00075   typedef block_dlex_tag order_tag;
00077 
00079   typedef std::less<idx_type> idx_comparer_type;
00080 
00082   enum { order_code = CTypes::block_dlex, baseorder_code = CTypes::dlex };
00083 
00085   BlockDegLexOrder(): base(), m_indices() {
00086     m_indices.push_back(0); 
00087     m_indices.push_back(CTypes::max_idx); 
00088   };
00089 
00091   BlockDegLexOrder(const self& rhs): base(rhs), m_indices(rhs.m_indices) {};
00092 
00094   ~BlockDegLexOrder() {};
00095 
00097   comp_type compare(idx_type, idx_type) const;
00098 
00100   comp_type compare(const monom_type&, const monom_type&) const;
00101 
00103   comp_type compare(const exp_type&, const exp_type&) const;
00104 
00106   monom_type lead(const poly_type&) const;
00107 
00109   monom_type lead(const poly_type& poly, deg_type) const;
00110 
00112   exp_type leadExp(const poly_type&) const;
00113 
00115   exp_type leadExp(const poly_type&, deg_type) const;
00116 
00118   indirect_iterator leadIteratorBegin(const poly_type&) const;
00119   indirect_iterator leadIteratorEnd() const;
00120   indirect_exp_iterator leadExpIteratorBegin(const poly_type&) const;
00121   indirect_exp_iterator leadExpIteratorEnd() const;
00122 
00124 
00125   block_iterator blockBegin() const { return m_indices.begin() + 1; }
00126   block_iterator blockEnd() const { return m_indices.end(); }
00127   void appendBlock(idx_type idx) { 
00128     m_indices.back() = idx;
00129     m_indices.push_back(CTypes::max_idx);
00130   }
00131   void clearBlocks() { 
00132     m_indices.clear(); 
00133     m_indices.push_back(0); 
00134     m_indices.push_back(CTypes::max_idx); 
00135   }
00137 
00138 private:
00139   block_idx_type m_indices;
00140 };
00141 
00142 
00143 END_NAMESPACE_PBORI
00144 
00145 #endif // BlockDegLexOrder_h_

Generated on Thu Feb 10 2011 for PolyBoRi by  doxygen 1.7.1