33 typename C::Number
number(
const N& n) {
43 std::vector<typename C::VariablePower> tmp;
45 for (
const auto& vp: *m) tmp.push_back(
varpower(vp.first, vp.second));
53 template<
typename N,
typename O,
typename P>
55 std::vector<typename C::Term> tmp;
56 for (
const auto& t: p) tmp.push_back(
term(t));
66 typename C::Number
number(
const N& n) {
80 for (
const auto& t: tmp) {
83 return std::accumulate(tmp.begin(), tmp.end(),
nullptr, std::multiplies<Monomial::Arg>());
88 return c(tmp.first) *
c(tmp.second);
carl is the main namespace for the library.
Interval< Number > exp(const Interval< Number > &i)
C::Term term(const Term< N > &t)
C::Variable variable(Variable::Arg v)
C::VariablePower varpower(Variable::Arg v, std::size_t exp)
test C::Number number(const N &n)
C::MPolynomial mpolynomial(const MultivariatePolynomial< N, O, P > &p)
C::Monomial monomial(const Monomial::Arg &m)
MultivariatePolynomial< typename C::Number > mpolynomial(const P &p)
Monomial::Arg varpower(const V &v, std::size_t exp)
Term< typename C::Number > term(const T &t)
C::Number number(const N &n)
Variable variable(const V &v)
Monomial::Arg monomial(const M &m)
A Variable represents an algebraic variable that can be used throughout carl.
The general-purpose multivariate polynomial class.
std::shared_ptr< const Monomial > Arg
Represents a single term, that is a numeric coefficient and a monomial.
Coefficient & coeff()
Get the coefficient.
Monomial::Arg & monomial()
Get the monomial.