PairManagerFacade.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_groebner_PairManagerFacade_h_
#define polybori_groebner_PairManagerFacade_h_
#include "PairStatusSet.h"
// include basic definitions
#include "groebner_defs.h"
#include "PairManager.h"
BEGIN_NAMESPACE_PBORIGB
template <class StrategyType>
class PairManagerWithStrategy:
public PairManager {
public:
PairManagerWithStrategy(const PairManager& mgr, StrategyType& strategy):
PairManager(mgr), m_strategy(strategy) { }
using PairManager::cleanTopByChainCriterion;
void cleanTopByChainCriterion() { cleanTopByChainCriterion(m_strategy); }
void introducePair(const Pair& pair) { introducePair(pair, isHFE()); };
using PairManager::introducePair;
protected:
bool isHFE() const { return m_strategy.optHFE; }
private:
StrategyType& m_strategy;
};
template <class StrategyType>
class PairManagerFacade {
typedef PairManagerFacade self;
typedef StrategyType strategy_type;
public:
PairManagerFacade(const BoolePolyRing& ring):
pairs(ring, get()) {}
PairManagerFacade(const self& rhs):
pairs(rhs.pairs, get()) { }
void cleanTopByChainCriterion() { pairs.cleanTopByChainCriterion(get()); }
void introducePair(const Pair& pair) { pairs.introducePairs(pair, isHFE()); }
PairManagerWithStrategy<strategy_type> pairs;
private:
bool isHFE() const { return get().optHFE; }
strategy_type& get() { return static_cast<strategy_type&>(*this); }
};
END_NAMESPACE_PBORIGB
#endif /* polybori_groebner_PairManagerFacade_h_ */
polybori::groebner::PairManagerFacade::introducePair
void introducePair(const Pair &pair)
Definition: PairManagerFacade.h:92
END_NAMESPACE_PBORIGB
#define END_NAMESPACE_PBORIGB
Definition: groebner_defs.h:16
polybori::BoolePolyRing
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
BEGIN_NAMESPACE_PBORIGB
#define BEGIN_NAMESPACE_PBORIGB
Definition: groebner_defs.h:15
polybori::groebner::PairE
This class defines PairE.
Definition: PairE.h:28
PairManager.h
groebner_defs.h
polybori::groebner::PairManager
This class defines PairManager.
Definition: PairManager.h:37
polybori::groebner::PairManagerWithStrategy::introducePair
void introducePair(const Pair &pair)
Definition: PairManagerFacade.h:55
polybori::groebner::PairManagerWithStrategy::cleanTopByChainCriterion
void cleanTopByChainCriterion()
Definition: PairManagerFacade.h:52
polybori::groebner::PairManagerFacade::pairs
PairManagerWithStrategy< strategy_type > pairs
For compatibility reasons make this a public member.
Definition: PairManagerFacade.h:95
polybori::groebner::PairManagerFacade
This class defines a facade for a given Strategy, which.
Definition: PairManagerFacade.h:79
PairStatusSet.h
polybori::groebner::PairManagerFacade::PairManagerFacade
PairManagerFacade(const self &rhs)
Definition: PairManagerFacade.h:88
polybori::groebner::PairManagerWithStrategy
This class extends PairManager with a reference to a strategy.
Definition: PairManagerFacade.h:41
polybori::groebner::PairManagerWithStrategy::PairManagerWithStrategy
PairManagerWithStrategy(const PairManager &mgr, StrategyType &strategy)
Definition: PairManagerFacade.h:45
polybori::groebner::PairManagerWithStrategy::isHFE
bool isHFE() const
Definition: PairManagerFacade.h:61
polybori::groebner::PairManagerFacade::PairManagerFacade
PairManagerFacade(const BoolePolyRing &ring)
Definition: PairManagerFacade.h:85
polybori::groebner::PairManagerFacade::cleanTopByChainCriterion
void cleanTopByChainCriterion()
Definition: PairManagerFacade.h:91