PolyBoRi
|
00001 // -*- c++ -*- 00002 //***************************************************************************** 00014 //***************************************************************************** 00015 00016 #ifndef polybori_groebner_ll_red_nf_h_ 00017 #define polybori_groebner_ll_red_nf_h_ 00018 00019 // include basic definitions 00020 #include "groebner_defs.h" 00021 #include "ReductionStrategy.h" 00022 #include "LLReduction.h" 00023 00024 BEGIN_NAMESPACE_PBORIGB 00025 00026 00027 template <bool have_redsb, bool single_call_for_noredsb, 00028 bool fast_multiplication> 00029 inline Polynomial 00030 ll_red_nf_generic(const Polynomial&, const BooleSet&); 00031 00032 template <bool fast> 00033 inline Polynomial 00034 multiply(const Polynomial &p, const Polynomial& q){ 00035 typedef CommutativeCacheManager<CCacheTypes::multiply_recursive> 00036 cache_mgr_type; 00037 00038 return dd_multiply<fast>(cache_mgr_type(p.ring()), 00039 p.navigation(), q.navigation(), 00040 BoolePolynomial(p.ring())); 00041 } 00042 00043 template <bool have_redsb, bool single_call_for_noredsb, 00044 bool fast_multiplication> 00045 inline Polynomial 00046 ll_red_nf_generic(const Polynomial& p, MonomialSet::navigator r_nav){ 00047 LLReduction<have_redsb, single_call_for_noredsb, fast_multiplication> 00048 func(p.ring()); 00049 00050 return func(p, r_nav); 00051 } 00052 00053 template <bool have_redsb, bool single_call_for_noredsb, 00054 bool fast_multiplication> 00055 inline Polynomial 00056 ll_red_nf_generic(const Polynomial& p, const BooleSet& reductors) { 00057 00058 return ll_red_nf_generic<have_redsb, single_call_for_noredsb, 00059 fast_multiplication>(p, reductors.navigation()); 00060 } 00061 00062 inline Polynomial 00063 ll_red_nf(const Polynomial& p,const BooleSet& reductors){ 00064 return ll_red_nf_generic<true, false, false>(p,reductors); 00065 } 00066 00067 inline Polynomial 00068 ll_red_nf_noredsb(const Polynomial& p,const BooleSet& reductors){ 00069 return ll_red_nf_generic<false, false, false>(p,reductors); 00070 } 00071 00072 inline Polynomial 00073 ll_red_nf_noredsb_single_recursive_call(const Polynomial& p, 00074 const BooleSet& reductors){ 00075 return ll_red_nf_generic<false, true, false>(p,reductors); 00076 } 00077 00078 00079 00080 END_NAMESPACE_PBORIGB 00081 00082 #endif /* polybori_groebner_ll_red_nf_h_ */