1 #ifndef GINAC_COLLECT_VARGS_HPP
2 #define GINAC_COLLECT_VARGS_HPP
4 #include <cln/integer.h>
6 #include <utility> // std::pair
11 typedef std::vector<int> exp_vector_t;
12 typedef std::vector<std::pair<exp_vector_t, ex> > ex_collect_t;
15 collect_vargs(ex_collect_t& ec, const ex& e, const exvector& x);
17 ex_collect_to_ex(const ex_collect_t& ec, const exvector& x);
20 * Leading coefficient of a multivariate polynomial e, considering it
21 * as a multivariate polynomial in x_0, \ldots x_{n-1} with coefficients
22 * being univariate polynomials in R[x_n] (where R is some ring)
24 extern ex lcoeff_wrt(ex e, const exvector& x);
27 * Leading coefficient c \in R (where R = Z or Z_p) of a multivariate
28 * polynomial e \in R[x_0, \ldots, x_n]
30 extern cln::cl_I integer_lcoeff(const ex& e, const exvector& vars);
34 #endif /* GINAC_COLLECT_VARGS_HPP */