PolynomialFactory.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_factories_PolynomialFactory_h_
#define polybori_factories_PolynomialFactory_h_
// include basic definitions
#include <polybori/pbori_defs.h>
#include <polybori/factories/CFactoryBase.h>
#include <polybori/BoolePolynomial.h>
#include <polybori/BooleMonomial.h>
BEGIN_NAMESPACE_PBORI
class PolynomialFactory:
public CFactoryBase {
typedef PolynomialFactory self;
typedef CFactoryBase base;
public:
typedef base::parent_type parent_type;
typedef BoolePolynomial value_type;
PolynomialFactory(const parent_type& ring): base(ring) {}
PolynomialFactory(const self& rhs): base(rhs) {}
~PolynomialFactory() {}
value_type operator()() const {
return value_type(parent());
}
value_type operator()(const value_type& rhs) const {
return rhs;
}
value_type operator()(const value_type::ring_type& ring) const {
return value_type(ring);
}
value_type operator()(const value_type::var_type& var) const {
return value_type::monom_type(var);
}
value_type operator()(const value_type::monom_type& monom) const {
return value_type(monom);
}
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);
}
value_type operator()(value_type::constant_type isOne,
const value_type::ring_type& ring) const {
return value_type(isOne, ring);
}
value_type operator()(value_type::constant_type isOne) const {
return value_type(isOne, parent());
}
value_type operator()(const value_type::dd_type& rhs) const {
return value_type(rhs);
}
value_type operator()(const value_type::navigator& rhs,
const value_type::ring_type& ring) const{
return value_type(rhs, ring);
}
value_type operator()(const value_type::navigator& rhs) const{
return value_type(rhs, parent());
}
};
END_NAMESPACE_PBORI
#endif /* polybori_factories_PolynomialFactory_h_ */
polybori::PolynomialFactory::value_type
BoolePolynomial value_type
We construct element of this type.
Definition: PolynomialFactory.h:46
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
BEGIN_NAMESPACE_PBORI
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
polybori::PolynomialFactory::operator()
value_type operator()(const value_type &rhs) const
Indirect copy constructor.
Definition: PolynomialFactory.h:63
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::navigator &rhs, const value_type::ring_type &ring) const
Construct polynomial from navigator and explicit ring.
Definition: PolynomialFactory.h:109
polybori::BoolePolyRing
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
polybori::PolynomialFactory
This base class PolynomialFactory is used for currying polynomial constructors with a BoolePolyRing...
Definition: PolynomialFactory.h:33
polybori::BoolePolynomial
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
polybori::PolynomialFactory::operator()
value_type operator()(value_type::constant_type isOne, const value_type::ring_type &ring) const
Construct polynomial from a constant value 0 or 1 and explicit ring.
Definition: PolynomialFactory.h:93
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::ring_type &ring) const
Get first variable of explicit ring.
Definition: PolynomialFactory.h:68
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::navigator &rhs) const
Construct polynomial from navigator.
Definition: PolynomialFactory.h:114
pbori_defs.h
polybori::PolynomialFactory::parent_type
base::parent_type parent_type
Type of parent.
Definition: PolynomialFactory.h:43
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::dd_type &rhs) const
Construct polynomial from decision diagram.
Definition: PolynomialFactory.h:104
polybori::CFactoryBase
This base class CFactoryBase is used for currying other constructors with a BoolePolyRing.
Definition: CFactoryBase.h:35
BoolePolynomial.h
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::var_type &var) const
Construct from Boolean variable (does not need ring)
Definition: PolynomialFactory.h:73
BooleMonomial.h
polybori::PolynomialFactory::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: PolynomialFactory.h:88
polybori::PolynomialFactory::PolynomialFactory
PolynomialFactory(const self &rhs)
Copy constructor.
Definition: PolynomialFactory.h:52
polybori::PolynomialFactory::~PolynomialFactory
~PolynomialFactory()
Destructor.
Definition: PolynomialFactory.h:55
polybori::PolynomialFactory::PolynomialFactory
PolynomialFactory(const parent_type &ring)
Construct from given ring.
Definition: PolynomialFactory.h:49
polybori::PolynomialFactory::operator()
value_type operator()() const
Get zero polynomial of the ring.
Definition: PolynomialFactory.h:58
polybori::PolynomialFactory::operator()
value_type operator()(value_type::constant_type isOne) const
Construct polynomial from a constant value 0 or 1.
Definition: PolynomialFactory.h:99
polybori::CCuddNavigator
This class defines an iterator for navigating through then and else branches of ZDDs.
Definition: CCuddNavigator.h:36
CFactoryBase.h
polybori::BooleSet
Definition: BooleSet.h:57
polybori::BooleConstant
This class wraps a bool value, which was not converted to a boolean polynomial or monomial yet...
Definition: BooleConstant.h:40
polybori::BooleMonomial
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::monom_type &monom) const
Construct from Boolean monomial (does not need ring)
Definition: PolynomialFactory.h:78
polybori::BooleVariable
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleVariable.h:39
polybori::PolynomialFactory::operator()
value_type operator()(const value_type::exp_type &rhs) const
Construct from exponent vector.
Definition: PolynomialFactory.h:83