PolyBoRi
LexOrder.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
78 //*****************************************************************************
79 
80 // include basic definitions
81 #include "pbori_defs.h"
82 
83 // include base order definitions
84 #include "COrderBase.h"
85 
86 #ifndef LexOrder_h_
87 #define LexOrder_h_
88 
90 
96 class LexOrder:
97  public COrderBase {
98 
99  public:
100  //-------------------------------------------------------------------------
101  // types definitions
102  //-------------------------------------------------------------------------
103 
105  typedef LexOrder self;
106 
108 
115 
117  enum { order_code = CTypes::lp, baseorder_code = order_code };
118 
120  typedef std::less<idx_type> idx_comparer_type;
121 
123  LexOrder(): base() {};
124 
126  LexOrder(const self& rhs): base(rhs) {};
127 
129  ~LexOrder() {};
130 
132  comp_type compare(idx_type, idx_type) const;
133 
135  comp_type compare(const monom_type&, const monom_type&) const;
136 
138  comp_type compare(const exp_type&, const exp_type&) const;
139 
141  monom_type lead(const poly_type&) const;
142 
144  monom_type lead(const poly_type& poly, size_type) const { return lead(poly); }
145 
147  exp_type leadExp(const poly_type&) const;
148 
150  exp_type leadExp(const poly_type& poly, size_type) const {
151  return leadExp(poly); }
152 
154  indirect_iterator leadIteratorBegin(const poly_type&) const;
155  indirect_iterator leadIteratorEnd() const;
156  indirect_exp_iterator leadExpIteratorBegin(const poly_type&) const;
157  indirect_exp_iterator leadExpIteratorEnd() const;
158 
159 };
160 
161 
163 
164 #endif // LexOrder_h_