]> www.ginac.de Git - ginac.git/blob - ginac/polynomial/collect_vargs.h
Fixed compile errors introduced in previous commit
[ginac.git] / ginac / polynomial / collect_vargs.h
1 #ifndef GINAC_COLLECT_VARGS_HPP
2 #define GINAC_COLLECT_VARGS_HPP
3 #include "ex.h"
4 #include <cln/integer.h>
5 #include <vector>
6 #include <utility> // std::pair
7
8 namespace GiNaC
9 {
10
11 typedef std::vector<int> exp_vector_t;
12 typedef std::vector<std::pair<exp_vector_t, ex> > ex_collect_t;
13
14 extern void
15 collect_vargs(ex_collect_t& ec, const ex& e, const exvector& x);
16 extern ex
17 ex_collect_to_ex(const ex_collect_t& ec, const exvector& x);
18
19 /**
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)
23  */
24 extern ex lcoeff_wrt(ex e, const exvector& x);
25
26 /**
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]
29  */
30 extern cln::cl_I integer_lcoeff(const ex& e, const exvector& vars);
31
32 } // namespace GiNaC
33
34 #endif /* GINAC_COLLECT_VARGS_HPP */