16 #ifndef polybori_groebner_LLReduction_h_
17 #define polybori_groebner_LLReduction_h_
28 template <
bool have_redsb,
bool single_call_for_noredsb,
29 bool fast_multiplication>
33 template<
class RingType>
40 return dd_multiply<fast_multiplication>(cache_mgr_type(p.
ring()),
53 template <
bool have_redsb,
bool single_call_for_noredsb,
bool fast_multiplication>
64 while((*r_nav)<p_index) {
78 Polynomial p_nav_else(cache_mgr.generate(p_nav.elseBranch()));
79 Polynomial p_nav_then(cache_mgr.generate(p_nav.thenBranch()));
81 if ((*r_nav) == p_index){
82 Polynomial r_nav_else(cache_mgr.generate(r_nav.elseBranch()));
84 if ((!have_redsb) && single_call_for_noredsb) {
85 res = operator()(p_nav_else +
multiply(r_nav_else, p_nav_then),
89 Polynomial tmp1 = operator()(p_nav_else, r_nav.thenBranch());
90 Polynomial tmp2 = operator()(p_nav_then, r_nav.thenBranch());
93 operator()(r_nav_else, r_nav.thenBranch()) );
100 operator()(p_nav_then, r_nav).diagram(),
101 operator()(p_nav_else, r_nav).diagram());
105 cache_mgr.insert(p_nav, r_nav, res.navigation());
LLReduction(const RingType &ring)
Definition: LLReduction.h:34
navigator navigation() const
Navigate through structure.
Definition: BoolePolynomial.h:441
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
const ring_type & ring() const
Access ring, where this belongs to.
Definition: BoolePolynomial.h:478
polybori::CacheManager< CCacheTypes::ll_red_nf > cache_mgr_type
Definition: LLReduction.h:48
#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
#define PBORI_LIKELY(expression)
For optimizing if-branches.
Definition: pbori_defs.h:56
Definition: CacheManager.h:48
polybori::BooleSet MonomialSet
Definition: groebner_defs.h:45
Polynomial multiply(const Polynomial &p, const Polynomial &q)
Definition: ll_red_nf.h:34
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
self & incrementThen()
Increment in then direction.
Definition: CCuddNavigator.h:191
Polynomial multiply(const Polynomial &p, const Polynomial &q)
Definition: LLReduction.h:36
cache_mgr_type cache_mgr
Definition: LLReduction.h:49
polybori::CTypes::idx_type idx_type
Definition: groebner_defs.h:44
This class defines an iterator for navigating through then and else branches of ZDDs.
Definition: CCuddNavigator.h:36
#define PBORI_UNLIKELY(expression)
Definition: pbori_defs.h:59
This class defines LLReduction.
Definition: LLReduction.h:30