00001 // -*- c++ -*- 00002 //***************************************************************************** 00014 //***************************************************************************** 00015 00016 #ifndef polybori_LexOrder_h_ 00017 #define polybori_LexOrder_h_ 00018 00019 // include basic definitions 00020 #include <polybori/pbori_defs.h> 00021 00022 // include base order definitions 00023 #include <polybori/orderings/COrderingFacade.h> 00024 #include <polybori/orderings/COrderingTags.h> 00025 00026 BEGIN_NAMESPACE_PBORI 00027 00033 class LexOrder: 00034 public COrderingFacade<LexOrder, lex_tag> { 00035 00037 typedef LexOrder self; 00038 00039 public: 00040 00042 typedef std::less<idx_type> idx_comparer_type; 00043 00045 LexOrder(): base() {}; 00046 00048 LexOrder(const self& rhs): base(rhs) {}; 00049 00051 ~LexOrder() {}; 00052 00054 comp_type compare(idx_type, idx_type) const; 00055 00057 comp_type compare(const monom_type&, const monom_type&) const; 00058 00060 comp_type compare(const exp_type&, const exp_type&) const; 00061 00063 monom_type lead(const poly_type&) const; 00064 00067 monom_type lead(const poly_type& poly, deg_type) const { 00068 return lead(poly); 00069 } 00070 00072 exp_type leadExp(const poly_type&) const; 00073 00076 exp_type leadExp(const poly_type& poly, deg_type) const { 00077 return leadExp(poly); 00078 } 00079 }; 00080 00081 00082 END_NAMESPACE_PBORI 00083 00084 #endif // polybori_LexOrder_h_