1 #ifndef VCSN_DYN_POLYNOMIAL_HH
2 # define VCSN_DYN_POLYNOMIAL_HH
23 virtual std::string
vname(
bool full =
true)
const = 0;
25 template <
typename PolynomialSet>
31 template <
typename PolynomialSet>
38 virtual bool empty()
const = 0;
42 template <
typename PolynomialSet>
43 class polynomial_wrapper:
public polynomial_base
56 virtual std::string
vname(
bool full =
true)
const override
72 virtual bool empty()
const override
86 using polynomial = std::shared_ptr<const detail::polynomial_base>;
88 template <
typename PolynomialSet>
92 const typename PolynomialSet::value_t&
polynomial)
95 return std::make_shared<wrapper_t>(
polynomial, ps);
100 #endif // !VCSN_DYN_POLYNOMIAL_HH
Linear combination of labels: map labels to weights.
Aggregate a polynomial and its polynomialset.
polynomial make_polynomial(const PolynomialSet &ps, const typename PolynomialSet::value_t &polynomial)
virtual std::string vname(bool full=true) const override
A description of the polynomial.
const polynomialset_t & polynomialset() const
virtual std::string vname(bool full=true) const =0
A description of the polynomial.
polynomial_wrapper(const polynomial_t &polynomial, const polynomialset_t &polynomialset)
PolynomialSet polynomialset_t
const polynomialset_t polynomialset_
The polynomial set.
const polynomial_wrapper< PolynomialSet > & as() const
const polynomial_t polynomial() const
typename polynomialset_t::value_t polynomial_t
virtual ~polynomial_wrapper()
virtual bool empty() const =0
Whether is zero.
const polynomial_t polynomial_
The polynomial.
polynomial_wrapper< PolynomialSet > & as()
std::shared_ptr< const detail::polynomial_base > polynomial
virtual bool empty() const override
Whether is zero.