3 * Definition of GiNaC's lst.
4 * This file was generated automatically by container.pl.
5 * Please do not modify it directly, edit the perl script instead!
6 * container.pl options: $CONTAINER=lst
15 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #ifndef __GINAC_LST_H__
33 #define __GINAC_LST_H__
36 #include <ginac/basic.h>
38 typedef list<ex> exlist;
40 class lst : public basic
46 lst(lst const & other);
47 lst const & operator=(lst const & other);
49 void copy(lst const & other);
50 void destroy(bool call_parent);
53 lst(exlist const & s, bool discardable=0);
54 lst(exlist * vp); // vp will be deleted
55 explicit lst(ex const & e1);
56 explicit lst(ex const & e1, ex const & e2);
57 explicit lst(ex const & e1, ex const & e2, ex const & e3);
58 explicit lst(ex const & e1, ex const & e2, ex const & e3,
60 explicit lst(ex const & e1, ex const & e2, ex const & e3,
61 ex const & e4, ex const & e5);
62 explicit lst(ex const & e1, ex const & e2, ex const & e3,
63 ex const & e4, ex const & e5, ex const & e6);
64 explicit lst(ex const & e1, ex const & e2, ex const & e3,
65 ex const & e4, ex const & e5, ex const & e6,
67 explicit lst(ex const & e1, ex const & e2, ex const & e3,
68 ex const & e4, ex const & e5, ex const & e6,
69 ex const & e7, ex const & e8);
70 explicit lst(ex const & e1, ex const & e2, ex const & e3,
71 ex const & e4, ex const & e5, ex const & e6,
72 ex const & e7, ex const & e8, ex const & e9);
73 explicit lst(ex const & e1, ex const & e2, ex const & e3,
74 ex const & e4, ex const & e5, ex const & e6,
75 ex const & e7, ex const & e8, ex const & e9,
79 basic * duplicate() const;
80 void printraw(ostream & os) const;
81 void print(ostream & os, unsigned upper_precedence=0) const;
82 void printtree(ostream & os, unsigned indent) const;
83 bool info(unsigned inf) const;
85 ex & let_op(int const i);
86 ex expand(unsigned options=0) const;
87 bool has(ex const & other) const;
88 ex eval(int level=0) const;
89 ex evalf(int level=0) const;
90 ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
91 ex diff(symbol const & s) const;
92 ex subs(lst const & ls, lst const & lr) const;
94 int compare_same_type(basic const & other) const;
95 bool is_equal_same_type(basic const & other) const;
96 unsigned return_type(void) const;
98 // new virtual functions which can be overridden by derived classes
100 virtual lst & append(ex const & b);
101 virtual lst & prepend(ex const & b);
104 virtual void printseq(ostream & os, char openbracket, char delim,
105 char closebracket, unsigned this_precedence,
106 unsigned upper_precedence=0) const;
107 virtual ex thislst(exlist const & v) const;
108 virtual ex thislst(exlist * vp) const;
111 bool is_canonical() const;
112 exlist evalchildren(int level) const;
113 exlist evalfchildren(int level) const;
114 exlist normalchildren(int level) const;
115 exlist diffchildren(symbol const & s) const;
116 exlist * subschildren(lst const & ls, lst const & lr) const;
120 static unsigned precedence;
125 extern const lst some_lst;
126 extern type_info const & typeid_lst;
130 #define ex_to_lst(X) (static_cast<lst const &>(*(X).bp))
132 #endif // ndef __GINAC_LST_H__