PolyBoRi
ReductionTerms.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_ReductionTerms_h_
17 #define polybori_groebner_ReductionTerms_h_
18 
19 #include "BoundedDivisorsOf.h"
20 #include "RelatedTerms.h"
21 #include "LLReductor.h"
22 #include "MinimalLeadingTerms.h"
23 #include "MonomialTerms.h"
24 #include "LeadingTerms.h"
25 #include "LeadingTerms00.h"
26 #include "LeadingTerms11.h"
27 #include "MonomialPlusOneTerms.h"
28 
29 #include <polybori/routines/pbori_algo.h> // which
30 
31 
32 // include basic definitions
33 #include "groebner_defs.h"
34 
36 
37 
38 // nf
39 MonomialSet mod_mon_set(const MonomialSet& as, const MonomialSet &vs);
40 
48  typedef ReductionTerms self;
49 
50 public:
58 
61  leadingTerms(ring), minimalLeadingTerms(ring),
62  leadingTerms11(ring), leadingTerms00(ring),
63  llReductor(ring), monomials(ring), monomials_plus_one(ring) { }
64 
67  RelatedTerms related(const PolyEntry& entry) const {
68  MonomialSet empty(entry.p.ring());
69  bool is00 = entry.literal_factors.is00Factorization();
70  bool is11 = entry.literal_factors.is11Factorization();
71 
72  if (!( (is00 && (leadingTerms == leadingTerms00)) ||
73  (is11 && (leadingTerms == leadingTerms11))) ){
74  PBORI_ASSERT (entry.p.isOne() || !is00 || !is11);
75 
76  return RelatedTerms(entry.lead, leadingTerms,
77  which(is11, leadingTerms11,
78  is00, leadingTerms00, empty));
79  }
80  return RelatedTerms(entry.p.ring());
81  }
82 
83 };
84 
86 
87 #endif /* polybori_groebner_ReductionTerms_h_ */
This class defines LeadingTerms11.
Definition: LeadingTerms11.h:31
bool_type isOne() const
Check whether polynomial is constant one.
Definition: BoolePolynomial.h:297
This class defines MonomialPlusOneTerms.
Definition: MonomialPlusOneTerms.h:31
ReductionTerms(const BoolePolyRing &ring)
Initialize term data for given ring.
Definition: ReductionTerms.h:60
bool is11Factorization() const
Definition: LiteralFactorization.cc:400
Polynomial p
Definition: PolyEntryBase.h:54
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
const ring_type & ring() const
Access ring, where this belongs to.
Definition: BoolePolynomial.h:478
bool is00Factorization() const
Definition: LiteralFactorization.cc:408
This class defines LeadingTerms00.
Definition: LeadingTerms00.h:32
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
This class defines PolyEntry.
Definition: PolyEntry.h:32
MonomialTerms monomials
Definition: ReductionTerms.h:56
RelatedTerms related(const PolyEntry &entry) const
Definition: ReductionTerms.h:67
polybori::BooleSet MonomialSet
Definition: groebner_defs.h:45
LLReductor llReductor
Definition: ReductionTerms.h:55
MonomialSet mod_mon_set(const MonomialSet &as, const MonomialSet &vs)
Definition: nf.cc:855
LiteralFactorization literal_factors
Definition: PolyEntryBase.h:53
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
This class defines term for ReductionStrategy.
Definition: ReductionTerms.h:46
This class defines MinimalLeadingTerms.
Definition: MinimalLeadingTerms.h:29
This class defines MonomialTerms.
Definition: MonomialTerms.h:31
MonomialPlusOneTerms monomials_plus_one
Definition: ReductionTerms.h:57
LeadingTerms00 leadingTerms00
Definition: ReductionTerms.h:54
const Type & which(bool condition, const Type1 &value1, const Type &value)
Definition: pbori_algo.h:870
LeadingTerms leadingTerms
Definition: ReductionTerms.h:51
LeadingTerms11 leadingTerms11
Definition: ReductionTerms.h:53
This class finds those terms in a given set which are related to given terms.
Definition: RelatedTerms.h:33
This class defines LeadingTerms.
Definition: LeadingTerms.h:31
Monomial lead
Definition: PolyEntryBase.h:55
Definition: BooleSet.h:57
MinimalLeadingTerms minimalLeadingTerms
Definition: ReductionTerms.h:52
This class defines LLReductor.
Definition: LLReductor.h:34