MonomialFactory.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_factories_MonomialFactory_h_
#define polybori_factories_MonomialFactory_h_
// include basic definitions
#include <polybori/pbori_defs.h>
#include <polybori/factories/CFactoryBase.h>
#include <polybori/BooleMonomial.h>
BEGIN_NAMESPACE_PBORI
class MonomialFactory:
public CFactoryBase {
typedef MonomialFactory self;
typedef CFactoryBase base;
public:
typedef base::parent_type parent_type;
typedef BooleMonomial value_type;
MonomialFactory(const parent_type& ring): base(ring) {}
MonomialFactory(const self& rhs): base(rhs) {}
~MonomialFactory() {}
value_type operator()() const {
return value_type(parent());
}
value_type operator()(const value_type::ring_type& ring) const {
return value_type(ring);
}
value_type operator()(const value_type& rhs) const {
return rhs;
}
value_type operator()(value_type::var_type var) const {
return value_type(var);
}
value_type operator()(const value_type::exp_type& rhs) const {
return value_type(rhs, parent());
}
value_type operator()(const value_type::exp_type& rhs,
const value_type::ring_type& ring) const {
return value_type(rhs, ring);
}
};
END_NAMESPACE_PBORI
#endif /* polybori_factories_MonomialFactory_h_ */
polybori::MonomialFactory::MonomialFactory
MonomialFactory(const parent_type &ring)
Construct from given ring.
Definition: MonomialFactory.h:49
polybori::BooleExponent
This class is just a wrapper for using variables for storing indices as interim data structure for Bo...
Definition: BooleExponent.h:34
END_NAMESPACE_PBORI
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
polybori::MonomialFactory::parent_type
base::parent_type parent_type
Type of parent.
Definition: MonomialFactory.h:43
BEGIN_NAMESPACE_PBORI
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
polybori::BoolePolyRing
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
pbori_defs.h
polybori::MonomialFactory::operator()
value_type operator()(const value_type::ring_type &ring) const
Get first variable of explicit ring.
Definition: MonomialFactory.h:63
polybori::CFactoryBase
This base class CFactoryBase is used for currying other constructors with a BoolePolyRing.
Definition: CFactoryBase.h:35
BooleMonomial.h
polybori::MonomialFactory::value_type
BooleMonomial value_type
We construct element of this type.
Definition: MonomialFactory.h:46
polybori::MonomialFactory::operator()
value_type operator()(const value_type::exp_type &rhs, const value_type::ring_type &ring) const
Construct from exponent vector and explicit ring.
Definition: MonomialFactory.h:83
polybori::MonomialFactory::operator()
value_type operator()(const value_type &rhs) const
Indirect copy constructor.
Definition: MonomialFactory.h:68
polybori::MonomialFactory::operator()
value_type operator()(value_type::var_type var) const
Construct from Boolean variable (does not need ring)
Definition: MonomialFactory.h:73
CFactoryBase.h
polybori::MonomialFactory::operator()
value_type operator()(const value_type::exp_type &rhs) const
Construct from exponent vector.
Definition: MonomialFactory.h:78
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::MonomialFactory::operator()
value_type operator()() const
Get first variable of the ring.
Definition: MonomialFactory.h:58
polybori::BooleVariable
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleVariable.h:39
polybori::MonomialFactory::~MonomialFactory
~MonomialFactory()
Destructor.
Definition: MonomialFactory.h:55
polybori::MonomialFactory::MonomialFactory
MonomialFactory(const self &rhs)
Copy constructor.
Definition: MonomialFactory.h:52
polybori::MonomialFactory
This base class MonomialFactory is used for currying monomial constructors with a BoolePolyRing...
Definition: MonomialFactory.h:33