3 * Interface to GiNaC's products of expressions. */
10 #include "expairseq.h"
12 /** Product of expressions. */
13 class mul : public expairseq
21 // default constructor, destructor, copy constructor assignment operator and helpers
25 mul(mul const & other);
26 mul const & operator=(mul const & other);
28 void copy(mul const & other);
29 void destroy(bool call_parent);
33 mul(ex const & lh, ex const & rh);
34 mul(exvector const & v);
35 mul(epvector const & v);
36 //mul(epvector const & v, bool do_not_canonicalize=0);
37 mul(epvector const & v, ex const & oc);
38 mul(epvector * vp, ex const & oc);
39 mul(ex const & lh, ex const & mh, ex const & rh);
41 // functions overriding virtual functions from bases classes
43 basic * duplicate() const;
44 void printraw(ostream & os) const;
45 void print(ostream & os, unsigned upper_precedence) const;
46 void printcsrc(ostream & os, unsigned type, unsigned upper_precedence) const;
47 bool info(unsigned inf) const;
48 int degree(symbol const & s) const;
49 int ldegree(symbol const & s) const;
50 ex coeff(symbol const & s, int const n=1) const;
51 ex eval(int level=0) const;
52 ex diff(symbol const & s) const;
53 ex series(symbol const & s, ex const & point, int order) const;
54 ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
55 numeric integer_content(void) const;
56 ex smod(numeric const &xi) const;
57 numeric max_coefficient(void) const;
58 exvector get_indices(void) const;
59 ex simplify_ncmul(exvector const & v) const;
61 int compare_same_type(basic const & other) const;
62 bool is_equal_same_type(basic const & other) const;
63 unsigned return_type(void) const;
64 unsigned return_type_tinfo(void) const;
65 ex thisexpairseq(epvector const & v, ex const & oc) const;
66 ex thisexpairseq(epvector * vp, ex const & oc) const;
67 void printpair(ostream & os, expair const & p,
68 unsigned upper_precedence) const;
69 expair split_ex_to_pair(ex const & e) const;
70 expair combine_ex_with_coeff_to_pair(ex const & e,
72 expair combine_pair_with_coeff_to_pair(expair const & p,
74 ex recombine_pair_to_ex(expair const & p) const;
75 bool expair_needs_further_processing(epp it);
76 ex default_overall_coeff(void) const;
77 void combine_overall_coeff(ex const & c);
78 void combine_overall_coeff(ex const & c1, ex const & c2);
79 bool can_make_flat(expair const & p) const;
80 ex expand(unsigned options=0) const;
82 // new virtual functions which can be overridden by derived classes
85 // non-virtual functions in this class
87 epvector * expandchildren(unsigned options) const;
92 static unsigned precedence;
97 extern const mul some_mul;
98 extern type_info const & typeid_mul;
100 #define ex_to_mul(X) static_cast<mul const &>(*(X).bp)
102 #endif // ndef _MUL_H_