3 * Definition of GiNaC's exprseq. */
6 * This file was generated automatically by container.pl.
7 * Please do not modify it directly, edit the perl script instead!
8 * container.pl options: $CONTAINER=exprseq
16 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 #ifndef __GINAC_EXPRSEQ_H__
34 #define __GINAC_EXPRSEQ_H__
37 #include <ginac/basic.h>
42 typedef vector<ex> exvector;
44 class exprseq : public basic
50 exprseq(exprseq const & other);
51 exprseq const & operator=(exprseq const & other);
53 void copy(exprseq const & other);
54 void destroy(bool call_parent);
57 exprseq(exvector const & s, bool discardable=0);
58 exprseq(exvector * vp); // vp will be deleted
59 explicit exprseq(ex const & e1);
60 explicit exprseq(ex const & e1, ex const & e2);
61 explicit exprseq(ex const & e1, ex const & e2, ex const & e3);
62 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
64 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
65 ex const & e4, ex const & e5);
66 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
67 ex const & e4, ex const & e5, ex const & e6);
68 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
69 ex const & e4, ex const & e5, ex const & e6,
71 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
72 ex const & e4, ex const & e5, ex const & e6,
73 ex const & e7, ex const & e8);
74 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
75 ex const & e4, ex const & e5, ex const & e6,
76 ex const & e7, ex const & e8, ex const & e9);
77 explicit exprseq(ex const & e1, ex const & e2, ex const & e3,
78 ex const & e4, ex const & e5, ex const & e6,
79 ex const & e7, ex const & e8, ex const & e9,
83 basic * duplicate() const;
84 void printraw(ostream & os) const;
85 void print(ostream & os, unsigned upper_precedence=0) const;
86 void printtree(ostream & os, unsigned indent) const;
87 bool info(unsigned inf) const;
89 ex & let_op(int const i);
90 ex expand(unsigned options=0) const;
91 bool has(ex const & other) const;
92 ex eval(int level=0) const;
93 ex evalf(int level=0) const;
94 ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
95 ex diff(symbol const & s) const;
96 ex subs(lst const & ls, lst const & lr) const;
98 int compare_same_type(basic const & other) const;
99 bool is_equal_same_type(basic const & other) const;
100 unsigned return_type(void) const;
102 // new virtual functions which can be overridden by derived classes
104 virtual exprseq & append(ex const & b);
105 // no prepend possible for exprseq
107 virtual void printseq(ostream & os, char openbracket, char delim,
108 char closebracket, unsigned this_precedence,
109 unsigned upper_precedence=0) const;
110 virtual ex thisexprseq(exvector const & v) const;
111 virtual ex thisexprseq(exvector * vp) const;
114 bool is_canonical() const;
115 exvector evalchildren(int level) const;
116 exvector evalfchildren(int level) const;
117 exvector normalchildren(int level) const;
118 exvector diffchildren(symbol const & s) const;
119 exvector * subschildren(lst const & ls, lst const & lr) const;
123 static unsigned precedence;
128 extern const exprseq some_exprseq;
129 extern type_info const & typeid_exprseq;
132 inline const exprseq &ex_to_exprseq(const ex &e)
134 return static_cast<const exprseq &>(*e.bp);
139 #endif // ndef __GINAC_EXPRSEQ_H__