PolyEntryReference.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_PolyEntryReference_h_
#define polybori_groebner_PolyEntryReference_h_
// include basic definitions
#include "groebner_defs.h"
#include <set>
#include "PolyEntryIndices.h"
#include "PolyEntry.h"
BEGIN_NAMESPACE_PBORIGB
class PolyEntryReference {
typedef PolyEntryReference self;
public:
typedef PolyEntryIndices vector_type;
typedef PolyEntry value_type;
PolyEntryReference(value_type &entry, vector_type& parent):
vPairCalculated(entry.vPairCalculated), minimal(entry.minimal),
m_entry(entry), m_parent(parent) { }
bool operator==(const self& rhs) const { return m_entry == rhs; }
void markVariablePairsCalculated() {
return m_entry.markVariablePairsCalculated(); }
bool propagatableBy(const PolyEntry& other) const {
return m_entry.propagatableBy(other);
}
std::set<idx_type>& vPairCalculated;
bool& minimal;
template <class Type>
self& operator=(const Type& rhs) {
Monomial lm(m_entry.lead);
m_entry = rhs;
m_parent.update(lm, m_entry);
return *this;
}
const value_type& get() const { return const_cast<const value_type&>(m_entry); }
operator const value_type&() const { return get(); }
private:
value_type& m_entry;
vector_type& m_parent;
};
END_NAMESPACE_PBORIGB
#endif /* polybori_groebner_PolyEntryReference_h_ */
polybori::groebner::PolyEntryReference::propagatableBy
bool propagatableBy(const PolyEntry &other) const
Definition: PolyEntryReference.h:54
PolyEntryIndices.h
polybori::groebner::PolyEntryReference::operator==
bool operator==(const self &rhs) const
Equality check.
Definition: PolyEntryReference.h:47
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
PolyEntry.h
polybori::groebner::PolyEntryReference::PolyEntryReference
PolyEntryReference(value_type &entry, vector_type &parent)
Construct from plain non-constant reference.
Definition: PolyEntryReference.h:42
polybori::groebner::PolyEntryReference::minimal
bool & minimal
Definition: PolyEntryReference.h:59
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::PolyEntryReference::operator=
self & operator=(const Type &rhs)
Assignment also triggers changes in the parent.
Definition: PolyEntryReference.h:64
groebner_defs.h
polybori::groebner::PolyEntryIndices
This class defines PolyEntryIndices.
Definition: PolyEntryIndices.h:33
polybori::groebner::PolyEntryReference::value_type
PolyEntry value_type
Definition: PolyEntryReference.h:39
polybori::groebner::PolyEntryReference::vector_type
PolyEntryIndices vector_type
Definition: PolyEntryReference.h:38
polybori::groebner::PolyEntryReference::vPairCalculated
std::set< idx_type > & vPairCalculated
Definition: PolyEntryReference.h:58
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::groebner::PolyEntryReference
This class defines PolyEntryReference.
Definition: PolyEntryReference.h:34
polybori::groebner::PolyEntryReference::markVariablePairsCalculated
void markVariablePairsCalculated()
Definition: PolyEntryReference.h:51