PolyBoRi
ll_red_nf.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_ll_red_nf_h_
17 #define polybori_groebner_ll_red_nf_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 #include "ReductionStrategy.h"
22 #include "LLReduction.h"
23 
25 
26 
27 template <bool have_redsb, bool single_call_for_noredsb,
28  bool fast_multiplication>
29 inline Polynomial
30 ll_red_nf_generic(const Polynomial&, const BooleSet&);
31 
32 template <bool fast>
33 inline Polynomial
34 multiply(const Polynomial &p, const Polynomial& q){
36  cache_mgr_type;
37 
38  return dd_multiply<fast>(cache_mgr_type(p.ring()),
39  p.navigation(), q.navigation(),
40  BoolePolynomial(p.ring()));
41 }
42 
43 template <bool have_redsb, bool single_call_for_noredsb,
44  bool fast_multiplication>
45 inline Polynomial
48  func(p.ring());
49 
50  return func(p, r_nav);
51 }
52 
53 template <bool have_redsb, bool single_call_for_noredsb,
54  bool fast_multiplication>
55 inline Polynomial
56 ll_red_nf_generic(const Polynomial& p, const BooleSet& reductors) {
57 
58  return ll_red_nf_generic<have_redsb, single_call_for_noredsb,
59  fast_multiplication>(p, reductors.navigation());
60 }
61 
62 inline Polynomial
63 ll_red_nf(const Polynomial& p,const BooleSet& reductors){
64  return ll_red_nf_generic<true, false, false>(p,reductors);
65 }
66 
67 inline Polynomial
68 ll_red_nf_noredsb(const Polynomial& p,const BooleSet& reductors){
69  return ll_red_nf_generic<false, false, false>(p,reductors);
70 }
71 
72 inline Polynomial
74  const BooleSet& reductors){
75  return ll_red_nf_generic<false, true, false>(p,reductors);
76 }
77 
78 
79 
81 
82 #endif /* polybori_groebner_ll_red_nf_h_ */
navigator navigation() const
Navigate through structure.
Definition: BoolePolynomial.h:441
Polynomial ll_red_nf_noredsb(const Polynomial &p, const BooleSet &reductors)
Definition: ll_red_nf.h:68
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
const ring_type & ring() const
Access ring, where this belongs to.
Definition: BoolePolynomial.h:478
BoolePolynomial Polynomial
Definition: embed.h:51
navigator navigation() const
Navigate through ZDD by incrementThen(), incrementElse(), and terminated()
Definition: CCuddDDFacade.h:455
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
Definition: CacheManager.h:48
Polynomial ll_red_nf_generic(const Polynomial &p, MonomialSet::navigator r_nav)
Definition: ll_red_nf.h:46
Polynomial multiply(const Polynomial &p, const Polynomial &q)
Definition: ll_red_nf.h:34
Polynomial ll_red_nf(const Polynomial &p, const BooleSet &reductors)
Definition: ll_red_nf.h:63
This class defines an iterator for navigating through then and else branches of ZDDs.
Definition: CCuddNavigator.h:36
Definition: BooleSet.h:57
This class defines LLReduction.
Definition: LLReduction.h:30
Polynomial ll_red_nf_noredsb_single_recursive_call(const Polynomial &p, const BooleSet &reductors)
Definition: ll_red_nf.h:73