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_ */