PolyBoRi
PolynomialFactory.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
15 //*****************************************************************************
16 
17 #ifndef polybori_factories_PolynomialFactory_h_
18 #define polybori_factories_PolynomialFactory_h_
19 
20 // include basic definitions
21 #include <polybori/pbori_defs.h>
24 #include <polybori/BooleMonomial.h>
26 
34  public CFactoryBase {
36  typedef PolynomialFactory self;
37 
39  typedef CFactoryBase base;
40 
41 public:
44 
47 
49  PolynomialFactory(const parent_type& ring): base(ring) {}
50 
52  PolynomialFactory(const self& rhs): base(rhs) {}
53 
56 
58  value_type operator()() const {
59  return value_type(parent());
60  }
61 
63  value_type operator()(const value_type& rhs) const {
64  return rhs;
65  }
66 
68  value_type operator()(const value_type::ring_type& ring) const {
69  return value_type(ring);
70  }
71 
73  value_type operator()(const value_type::var_type& var) const {
74  return value_type::monom_type(var);
75  }
76 
78  value_type operator()(const value_type::monom_type& monom) const {
79  return value_type(monom);
80  }
81 
83  value_type operator()(const value_type::exp_type& rhs) const {
84  return value_type(rhs, parent());
85  }
86 
88  value_type operator()(const value_type::exp_type& rhs,
89  const value_type::ring_type& ring) const {
90  return value_type(rhs, ring);
91  }
94  const value_type::ring_type& ring) const {
95  return value_type(isOne, ring);
96  }
97 
99  value_type operator()(value_type::constant_type isOne) const {
100  return value_type(isOne, parent());
101  }
102 
104  value_type operator()(const value_type::dd_type& rhs) const {
105  return value_type(rhs);
106  }
107 
109  value_type operator()(const value_type::navigator& rhs,
110  const value_type::ring_type& ring) const{
111  return value_type(rhs, ring);
112  }
114  value_type operator()(const value_type::navigator& rhs) const{
115  return value_type(rhs, parent());
116  }
117 };
118 
120 
121 #endif /* polybori_factories_PolynomialFactory_h_ */
BoolePolynomial value_type
We construct element of this type.
Definition: PolynomialFactory.h:46
This class is just a wrapper for using variables for storing indices as interim data structure for Bo...
Definition: BooleExponent.h:34
#define END_NAMESPACE_PBORI
Finish project's namespace.
Definition: pbori_defs.h:77
#define BEGIN_NAMESPACE_PBORI
Start project's namespace.
Definition: pbori_defs.h:74
value_type operator()(const value_type &rhs) const
Indirect copy constructor.
Definition: PolynomialFactory.h:63
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
This class reinterprets decicion diagram managers as Boolean polynomial rings, adds an ordering and v...
Definition: BoolePolyRing.h:40
This base class PolynomialFactory is used for currying polynomial constructors with a BoolePolyRing...
Definition: PolynomialFactory.h:33
This class wraps the underlying decicion diagram type and defines the necessary operations.
Definition: BoolePolynomial.h:85
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
value_type operator()(const value_type::ring_type &ring) const
Get first variable of explicit ring.
Definition: PolynomialFactory.h:68
value_type operator()(const value_type::navigator &rhs) const
Construct polynomial from navigator.
Definition: PolynomialFactory.h:114
base::parent_type parent_type
Type of parent.
Definition: PolynomialFactory.h:43
value_type operator()(const value_type::dd_type &rhs) const
Construct polynomial from decision diagram.
Definition: PolynomialFactory.h:104
This base class CFactoryBase is used for currying other constructors with a BoolePolyRing.
Definition: CFactoryBase.h:35
value_type operator()(const value_type::var_type &var) const
Construct from Boolean variable (does not need ring)
Definition: PolynomialFactory.h:73
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
PolynomialFactory(const self &rhs)
Copy constructor.
Definition: PolynomialFactory.h:52
~PolynomialFactory()
Destructor.
Definition: PolynomialFactory.h:55
PolynomialFactory(const parent_type &ring)
Construct from given ring.
Definition: PolynomialFactory.h:49
value_type operator()() const
Get zero polynomial of the ring.
Definition: PolynomialFactory.h:58
value_type operator()(value_type::constant_type isOne) const
Construct polynomial from a constant value 0 or 1.
Definition: PolynomialFactory.h:99
This class defines an iterator for navigating through then and else branches of ZDDs.
Definition: CCuddNavigator.h:36
Definition: BooleSet.h:57
This class wraps a bool value, which was not converted to a boolean polynomial or monomial yet...
Definition: BooleConstant.h:40
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleMonomial.h:50
value_type operator()(const value_type::monom_type &monom) const
Construct from Boolean monomial (does not need ring)
Definition: PolynomialFactory.h:78
This class is just a wrapper for using variables from cudd's decicion diagram.
Definition: BooleVariable.h:39
value_type operator()(const value_type::exp_type &rhs) const
Construct from exponent vector.
Definition: PolynomialFactory.h:83