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"
47 void ex::printraw(ostream & os) const
49 debugmsg("ex printraw",LOGLEVEL_PRINT);
56 void basic::printraw(ostream & os) const
58 debugmsg("basic printraw",LOGLEVEL_PRINT);
59 os << "[basic object]";
62 void symbol::printraw(ostream & os) const
64 debugmsg("symbol printraw",LOGLEVEL_PRINT);
65 os << "symbol(" << "name=" << name << ",serial=" << serial
66 << ",hash=" << hashvalue << ",flags=" << flags << ")";
69 void constant::printraw(ostream & os) const
71 debugmsg("constant printraw",LOGLEVEL_PRINT);
72 os << "constant(" << name << ")";
75 void power::printraw(ostream & os) const
77 debugmsg("power printraw",LOGLEVEL_PRINT);
82 exponent.printraw(os);
83 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
86 void fail::printraw(ostream & os) const
88 debugmsg("fail printraw",LOGLEVEL_PRINT);
92 void expairseq::printraw(ostream & os) const
94 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
97 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
99 (*cit).rest.printraw(os);
101 (*cit).coeff.printraw(os);
107 void add::printraw(ostream & os) const
109 debugmsg("add printraw",LOGLEVEL_PRINT);
112 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
114 (*it).rest.bp->printraw(os);
116 (*it).coeff.bp->printraw(os);
119 os << ",hash=" << hashvalue << ",flags=" << flags;
123 void mul::printraw(ostream & os) const
125 debugmsg("mul printraw",LOGLEVEL_PRINT);
128 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
130 (*it).rest.bp->printraw(os);
132 (*it).coeff.bp->printraw(os);
135 os << ",hash=" << hashvalue << ",flags=" << flags;
139 void ncmul::printraw(ostream & os) const
141 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
144 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
145 (*it).bp->printraw(os);
148 os << ",hash=" << hashvalue << ",flags=" << flags;
152 /*void function::printraw(ostream & os) const
154 * debugmsg("function printraw",LOGLEVEL_PRINT);
156 * os << "function." << name << "(";
157 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
158 * (*it).bp->print(os);
164 void series::printraw(ostream &os) const
166 debugmsg("symbol printraw", LOGLEVEL_PRINT);
167 os << "series(" << var << ";" << point << ";";
168 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
169 os << "(" << (*i).rest << "," << (*i).coeff << "),";
174 void relational::printraw(ostream & os) const
176 debugmsg("relational printraw",LOGLEVEL_PRINT);
198 case greater_or_equal:
202 os << "(INVALID RELATIONAL OPERATOR)";
207 void matrix::printraw(ostream & os) const
209 debugmsg("matrix printraw",LOGLEVEL_PRINT);
210 os << "matrix(" << row << "," << col <<",";
211 for (int r=0; r<row-1; ++r) {
213 for (int c=0; c<col-1; ++c) {
214 os << m[r*col+c] << ",";
216 os << m[col*(r-1)-1] << "),";
219 for (int c=0; c<col-1; ++c) {
220 os << m[(row-1)*col+c] << ",";
222 os << m[row*col-1] << "))";