PolyEntry.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_PolyEntry_h_
#define polybori_groebner_PolyEntry_h_
#include "LiteralFactorization.h"
#include "PolyEntryBase.h"
// include basic definitions
#include "groebner_defs.h"
BEGIN_NAMESPACE_PBORIGB
class PolyEntry:
public PolyEntryBase {
PolyEntry(); /* never use this one! */
typedef PolyEntry self;
typedef PolyEntryBase base;
public:
PolyEntry(const Polynomial &p): base(p) {}
bool operator==(const self& other) const { return p == other.p; }
self& operator=(const self& rhs) {
return static_cast<self&>(base::operator=(rhs));
}
self& operator=(const Polynomial& rhs) {
p = rhs;
recomputeInformation();
return *this;
}
deg_type ecart() const{ return deg-leadDeg; }
void recomputeInformation();
void markVariablePairsCalculated() {
vPairCalculated.insert(leadExp.begin(), leadExp.end());
}
bool propagatableBy(const PolyEntry& other) const {
return minimal && (deg <= 2) && (length > 1) && (p != other.p) &&
tailVariables.reducibleBy(other.leadExp);
}
bool isSingleton() const { return length == 1; }
};
inline bool
should_propagate(const PolyEntry& e){
return ( (e.length == 1) && (e.deg > 0) && (e.deg < 4) ) ||
( (e.length == 2) && (e.ecart() == 0) && (e.deg < 3) );
}
END_NAMESPACE_PBORIGB
#endif /* polybori_PolyEntry_h_ */
polybori::groebner::PolyEntry::ecart
deg_type ecart() const
Definition: PolyEntry.h:54
polybori::groebner::PolyEntryBase::p
Polynomial p
Definition: PolyEntryBase.h:54
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::groebner::deg_type
int deg_type
Definition: groebner_defs.h:42
polybori::groebner::PolyEntry::operator=
self & operator=(const self &rhs)
Definition: PolyEntry.h:44
polybori::groebner::should_propagate
bool should_propagate(const PolyEntry &e)
Definition: PolyEntry.h:75
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PolyEntry
This class defines PolyEntry.
Definition: PolyEntry.h:32
polybori::groebner::PolyEntryBase::deg
deg_type deg
Definition: PolyEntryBase.h:58
polybori::BoolePolynomial
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
polybori::groebner::PolyEntry::propagatableBy
bool propagatableBy(const PolyEntry &other) const
Definition: PolyEntry.h:62
polybori::groebner::PolyEntryBase
This class defines the base of PolyEntry.
Definition: PolyEntryBase.h:29
groebner_defs.h
PolyEntryBase.h
polybori::groebner::PolyEntry::isSingleton
bool isSingleton() const
Definition: PolyEntry.h:67
polybori::groebner::PolyEntryBase::leadExp
Exponent leadExp
Definition: PolyEntryBase.h:60
polybori::groebner::PolyEntry::operator=
self & operator=(const Polynomial &rhs)
Definition: PolyEntry.h:48
polybori::groebner::PolyEntry::operator==
bool operator==(const self &other) const
Definition: PolyEntry.h:42
polybori::groebner::PolyEntry::PolyEntry
PolyEntry(const Polynomial &p)
Definition: PolyEntry.h:40
polybori::groebner::PolyEntryBase::length
len_type length
Definition: PolyEntryBase.h:57
LiteralFactorization.h
polybori::groebner::PolyEntry::markVariablePairsCalculated
void markVariablePairsCalculated()
Definition: PolyEntry.h:58