MonomialPlusOneTerms.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_MonomialPlusOneTerms_h_
#define polybori_groebner_MonomialPlusOneTerms_h_
#include "TermsFacade.h"
#include "PolyEntry.h"
// include basic definitions
#include "groebner_defs.h"
BEGIN_NAMESPACE_PBORIGB
class MonomialPlusOneTerms:
public TermsFacade<MonomialPlusOneTerms> {
public:
template <class Type>
MonomialPlusOneTerms(const Type& rhs): TermsFacade<MonomialPlusOneTerms>(rhs) {}
bool isCompatible(const PolyEntry& entry) const {
PBORI_ASSERT( (entry.length != 2) || entry.p.isPair());
return (entry.length == 2) && (entry.p.hasConstantPart());
}
};
END_NAMESPACE_PBORIGB
#endif /* polybori_groebner_MonomialPlusOneTerms_h_ */
polybori::BoolePolynomial::isPair
bool_type isPair() const
Test, whether we have two terms only.
Definition: BoolePolynomial.h:475
polybori::groebner::MonomialPlusOneTerms
This class defines MonomialPlusOneTerms.
Definition: MonomialPlusOneTerms.h:31
polybori::groebner::PolyEntryBase::p
Polynomial p
Definition: PolyEntryBase.h:54
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
PolyEntry.h
polybori::BoolePolynomial::hasConstantPart
bool_type hasConstantPart() const
Check whether polynomial has term one.
Definition: BoolePolynomial.h:303
TermsFacade.h
polybori::groebner::TermsFacade
This class defines TermsFacade.
Definition: TermsFacade.h:30
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PolyEntry
This class defines PolyEntry.
Definition: PolyEntry.h:32
groebner_defs.h
PBORI_ASSERT
#define PBORI_ASSERT(arg)
Definition: pbori_defs.h:118
polybori::groebner::PolyEntryBase::length
len_type length
Definition: PolyEntryBase.h:57
polybori::groebner::MonomialPlusOneTerms::MonomialPlusOneTerms
MonomialPlusOneTerms(const Type &rhs)
Definition: MonomialPlusOneTerms.h:36
polybori::groebner::MonomialPlusOneTerms::isCompatible
bool isCompatible(const PolyEntry &entry) const
Definition: MonomialPlusOneTerms.h:38