VariableFactory.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_factories_VariableFactory_h_
#define polybori_factories_VariableFactory_h_
// include basic definitions
#include <polybori/pbori_defs.h>
#include <polybori/factories/CFactoryBase.h>
#include <polybori/BooleVariable.h>
BEGIN_NAMESPACE_PBORI
class VariableFactory:
public CFactoryBase {
typedef VariableFactory self;
typedef CFactoryBase base;
public:
typedef base::parent_type parent_type;
typedef BooleVariable value_type;
VariableFactory(const parent_type& ring): base(ring) {}
VariableFactory(const self& rhs): base(rhs) {}
~VariableFactory() {}
value_type operator()() const {
return value_type(0, parent());
}
value_type operator()(const value_type& rhs) const {
return rhs;
}
value_type operator()(const value_type::ring_type& ring) const {
return value_type(0, ring);
}
value_type operator()(value_type::idx_type idx,
const value_type::ring_type& ring) const {
return value_type(idx, ring);
}
value_type operator()(value_type::idx_type idx) const {
return value_type(idx, parent());
}
};
END_NAMESPACE_PBORI
#endif /* polybori_factories_VariableFactory_h_ */
polybori::VariableFactory::~VariableFactory
~VariableFactory()
Destructor.
Definition: VariableFactory.h:55
END_NAMESPACE_PBORI
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
BEGIN_NAMESPACE_PBORI
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
polybori::VariableFactory
This base class VariableFactory is used for currying variable constructors with a BoolePolyRing...
Definition: VariableFactory.h:33
polybori::BoolePolyRing
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
polybori::VariableFactory::value_type
BooleVariable value_type
We construct element of this type.
Definition: VariableFactory.h:46
polybori::VariableFactory::operator()
value_type operator()(value_type::idx_type idx) const
Construct i-th variable.
Definition: VariableFactory.h:78
polybori::VariableFactory::operator()
value_type operator()(const value_type::ring_type &ring) const
Get first variable of explicit ring.
Definition: VariableFactory.h:68
BooleVariable.h
pbori_defs.h
polybori::CFactoryBase
This base class CFactoryBase is used for currying other constructors with a BoolePolyRing.
Definition: CFactoryBase.h:35
polybori::VariableFactory::operator()
value_type operator()() const
Get first variable of the ring.
Definition: VariableFactory.h:58
polybori::VariableFactory::operator()
value_type operator()(value_type::idx_type idx, const value_type::ring_type &ring) const
Construct i-th variable for explit ring.
Definition: VariableFactory.h:73
polybori::CAuxTypes::idx_type
int idx_type
Type for indices.
Definition: pbori_defs.h:228
polybori::VariableFactory::operator()
value_type operator()(const value_type &rhs) const
Indirect copy constructor.
Definition: VariableFactory.h:63
CFactoryBase.h
polybori::VariableFactory::VariableFactory
VariableFactory(const self &rhs)
Copy constructor.
Definition: VariableFactory.h:52
polybori::VariableFactory::VariableFactory
VariableFactory(const parent_type &ring)
Construct from given ring.
Definition: VariableFactory.h:49
polybori::BooleVariable
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleVariable.h:39
polybori::VariableFactory::parent_type
base::parent_type parent_type
Type of parent.
Definition: VariableFactory.h:43