3 * print in ugly raw format, so brave developers can have a look at the
4 * underlying structure. */
7 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 /* We are cheating here, because we don't want to include the underlying
25 * bignum package's headers again, so in this file we omit the definition of
26 * void numeric::printraw(ostream & os) const; */
34 #include "expairseq.h"
43 #include "relational.h"
48 #ifndef NO_GINAC_NAMESPACE
50 #endif // ndef NO_GINAC_NAMESPACE
52 void ex::printraw(ostream & os) const
54 debugmsg("ex printraw",LOGLEVEL_PRINT);
61 void basic::printraw(ostream & os) const
63 debugmsg("basic printraw",LOGLEVEL_PRINT);
64 os << "[basic object]";
67 void symbol::printraw(ostream & os) const
69 debugmsg("symbol printraw",LOGLEVEL_PRINT);
70 os << "symbol(" << "name=" << name << ",serial=" << serial
71 << ",hash=" << hashvalue << ",flags=" << flags << ")";
74 void constant::printraw(ostream & os) const
76 debugmsg("constant printraw",LOGLEVEL_PRINT);
77 os << "constant(" << name << ")";
80 void power::printraw(ostream & os) const
82 debugmsg("power printraw",LOGLEVEL_PRINT);
87 exponent.printraw(os);
88 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
91 void fail::printraw(ostream & os) const
93 debugmsg("fail printraw",LOGLEVEL_PRINT);
97 void expairseq::printraw(ostream & os) const
99 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
102 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
104 (*cit).rest.printraw(os);
106 (*cit).coeff.printraw(os);
112 void add::printraw(ostream & os) const
114 debugmsg("add printraw",LOGLEVEL_PRINT);
117 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
119 (*it).rest.bp->printraw(os);
121 (*it).coeff.bp->printraw(os);
124 os << ",hash=" << hashvalue << ",flags=" << flags;
128 void mul::printraw(ostream & os) const
130 debugmsg("mul printraw",LOGLEVEL_PRINT);
133 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
135 (*it).rest.bp->printraw(os);
137 (*it).coeff.bp->printraw(os);
140 os << ",hash=" << hashvalue << ",flags=" << flags;
144 void ncmul::printraw(ostream & os) const
146 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
149 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
150 (*it).bp->printraw(os);
153 os << ",hash=" << hashvalue << ",flags=" << flags;
157 /*void function::printraw(ostream & os) const
159 * debugmsg("function printraw",LOGLEVEL_PRINT);
161 * os << "function." << name << "(";
162 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
163 * (*it).bp->print(os);
169 void series::printraw(ostream &os) const
171 debugmsg("symbol printraw", LOGLEVEL_PRINT);
172 os << "series(" << var << ";" << point << ";";
173 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
174 os << "(" << (*i).rest << "," << (*i).coeff << "),";
179 void relational::printraw(ostream & os) const
181 debugmsg("relational printraw",LOGLEVEL_PRINT);
203 case greater_or_equal:
207 os << "(INVALID RELATIONAL OPERATOR)";
212 void matrix::printraw(ostream & os) const
214 debugmsg("matrix printraw",LOGLEVEL_PRINT);
215 os << "matrix(" << row << "," << col <<",";
216 for (int r=0; r<row-1; ++r) {
218 for (int c=0; c<col-1; ++c) {
219 os << m[r*col+c] << ",";
221 os << m[col*(r-1)-1] << "),";
224 for (int c=0; c<col-1; ++c) {
225 os << m[(row-1)*col+c] << ",";
227 os << m[row*col-1] << "))";
230 #ifndef NO_GINAC_NAMESPACE
232 #endif // ndef NO_GINAC_NAMESPACE