3 * Interface to GiNaC's sums of expressions. */
10 /** Sum of expressions. */
11 class add : public expairseq
19 // default constructor, destructor, copy constructor assignment operator and helpers
23 add(add const & other);
24 add const & operator=(add const & other);
26 void copy(add const & other);
27 void destroy(bool call_parent);
31 add(ex const & lh, ex const & rh);
32 add(exvector const & v);
33 add(epvector const & v);
34 //add(epvector const & v, bool do_not_canonicalize=0);
35 add(epvector const & v, ex const & oc);
36 add(epvector * vp, ex const & oc);
38 // functions overriding virtual functions from bases classes
40 basic * duplicate() const;
41 void printraw(ostream & os) const;
42 void print(ostream & os, unsigned upper_precedence=0) const;
43 void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
44 bool info(unsigned inf) const;
45 int degree(symbol const & s) const;
46 int ldegree(symbol const & s) const;
47 ex coeff(symbol const & s, int const n=1) const;
48 ex eval(int level=0) const;
49 ex diff(symbol const & s) const;
50 ex series(symbol const & s, ex const & point, int order) const;
51 ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
52 numeric integer_content(void) const;
53 ex smod(numeric const &xi) const;
54 numeric max_coefficient(void) const;
55 exvector get_indices(void) const;
56 ex simplify_ncmul(exvector const & v) const;
58 int compare_same_type(basic const & other) const;
59 bool is_equal_same_type(basic const & other) const;
60 unsigned return_type(void) const;
61 unsigned return_type_tinfo(void) const;
62 ex thisexpairseq(epvector const & v, ex const & oc) const;
63 ex thisexpairseq(epvector * vp, ex const & oc) const;
64 void printpair(ostream & os, expair const & p,
65 unsigned upper_precedence) const;
66 expair split_ex_to_pair(ex const & e) const;
67 expair combine_ex_with_coeff_to_pair(ex const & e,
69 expair combine_pair_with_coeff_to_pair(expair const & p,
71 ex recombine_pair_to_ex(expair const & p) const;
72 ex expand(unsigned options=0) const;
74 // new virtual functions which can be overridden by derived classes
77 // non-virtual functions in this class
83 static unsigned precedence;
88 extern const add some_add;
89 extern type_info const & typeid_add;
91 #define ex_to_add(X) static_cast<add const &>(*(X).bp)
93 #endif // ndef _ADD_H_