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

BlockDegLexOrder.h

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

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