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 
59  return value_type(parent());
60  }
61 
63  value_type operator()(const value_type& rhs) const {
64  return rhs;
65  }
66 
69  return value_type(ring);
70  }
71 
74  return value_type::monom_type(var);
75  }
76 
79  return value_type(monom);
80  }
81 
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 
100  return value_type(isOne, parent());
101  }
102 
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  }
115  return value_type(rhs, parent());
116  }
117 };
118 
120 
121 #endif /* polybori_factories_PolynomialFactory_h_ */