3 * Definition of GiNaC's lst. */
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=lst
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_LST_H__
34 #define __GINAC_LST_H__
37 #include <ginac/basic.h>
42 typedef list<ex> exlist;
44 class lst : public basic
50 lst(lst const & other);
51 lst const & operator=(lst const & other);
53 void copy(lst const & other);
54 void destroy(bool call_parent);
57 lst(exlist const & s, bool discardable=0);
58 lst(exlist * vp); // vp will be deleted
59 explicit lst(ex const & e1);
60 explicit lst(ex const & e1, ex const & e2);
61 explicit lst(ex const & e1, ex const & e2, ex const & e3);
62 explicit lst(ex const & e1, ex const & e2, ex const & e3,
64 explicit lst(ex const & e1, ex const & e2, ex const & e3,
65 ex const & e4, ex const & e5);
66 explicit lst(ex const & e1, ex const & e2, ex const & e3,
67 ex const & e4, ex const & e5, ex const & e6);
68 explicit lst(ex const & e1, ex const & e2, ex const & e3,
69 ex const & e4, ex const & e5, ex const & e6,
71 explicit lst(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 lst(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 lst(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 lst & append(ex const & b);
105 virtual lst & prepend(ex const & b);
108 virtual void printseq(ostream & os, char openbracket, char delim,
109 char closebracket, unsigned this_precedence,
110 unsigned upper_precedence=0) const;
111 virtual ex thislst(exlist const & v) const;
112 virtual ex thislst(exlist * vp) const;
115 bool is_canonical() const;
116 exlist evalchildren(int level) const;
117 exlist evalfchildren(int level) const;
118 exlist normalchildren(int level) const;
119 exlist diffchildren(symbol const & s) const;
120 exlist * subschildren(lst const & ls, lst const & lr) const;
124 static unsigned precedence;
129 extern const lst some_lst;
130 extern type_info const & typeid_lst;
133 inline const lst &ex_to_lst(const ex &e)
135 return static_cast<const lst &>(*e.bp);
140 #endif // ndef __GINAC_LST_H__