PolyBoRi
|
00001 // -*- c++ -*- 00002 //***************************************************************************** 00014 //***************************************************************************** 00015 00016 #ifndef polybori_groebner_ReductionTerms_h_ 00017 #define polybori_groebner_ReductionTerms_h_ 00018 00019 #include "BoundedDivisorsOf.h" 00020 #include "RelatedTerms.h" 00021 #include "LLReductor.h" 00022 #include "MinimalLeadingTerms.h" 00023 #include "MonomialTerms.h" 00024 #include "LeadingTerms.h" 00025 #include "LeadingTerms00.h" 00026 #include "LeadingTerms11.h" 00027 #include "MonomialPlusOneTerms.h" 00028 00029 #include <polybori/routines/pbori_algo.h> // which 00030 00031 00032 // include basic definitions 00033 #include "groebner_defs.h" 00034 00035 BEGIN_NAMESPACE_PBORIGB 00036 00037 00038 // nf 00039 MonomialSet mod_mon_set(const MonomialSet& as, const MonomialSet &vs); 00040 00046 class ReductionTerms { 00048 typedef ReductionTerms self; 00049 00050 public: 00051 LeadingTerms leadingTerms; 00052 MinimalLeadingTerms minimalLeadingTerms; 00053 LeadingTerms11 leadingTerms11; 00054 LeadingTerms00 leadingTerms00; 00055 LLReductor llReductor; 00056 MonomialTerms monomials; 00057 MonomialPlusOneTerms monomials_plus_one; 00058 00060 ReductionTerms(const BoolePolyRing& ring): 00061 leadingTerms(ring), minimalLeadingTerms(ring), 00062 leadingTerms11(ring), leadingTerms00(ring), 00063 llReductor(ring), monomials(ring), monomials_plus_one(ring) { } 00064 00067 RelatedTerms related(const PolyEntry& entry) const { 00068 MonomialSet empty(entry.p.ring()); 00069 bool is00 = entry.literal_factors.is00Factorization(); 00070 bool is11 = entry.literal_factors.is11Factorization(); 00071 00072 if (!( (is00 && (leadingTerms == leadingTerms00)) || 00073 (is11 && (leadingTerms == leadingTerms11))) ){ 00074 PBORI_ASSERT (entry.p.isOne() || !is00 || !is11); 00075 00076 return RelatedTerms(entry.lead, leadingTerms, 00077 which(is11, leadingTerms11, 00078 is00, leadingTerms00, empty)); 00079 } 00080 return RelatedTerms(entry.p.ring()); 00081 } 00082 00083 }; 00084 00085 END_NAMESPACE_PBORIGB 00086 00087 #endif /* polybori_groebner_ReductionTerms_h_ */