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"
50 void ex::printraw(ostream & os) const
52 debugmsg("ex printraw",LOGLEVEL_PRINT);
59 void basic::printraw(ostream & os) const
61 debugmsg("basic printraw",LOGLEVEL_PRINT);
62 os << "[basic object]";
65 void symbol::printraw(ostream & os) const
67 debugmsg("symbol printraw",LOGLEVEL_PRINT);
68 os << "symbol(" << "name=" << name << ",serial=" << serial
69 << ",hash=" << hashvalue << ",flags=" << flags << ")";
72 void constant::printraw(ostream & os) const
74 debugmsg("constant printraw",LOGLEVEL_PRINT);
75 os << "constant(" << name << ")";
78 void power::printraw(ostream & os) const
80 debugmsg("power printraw",LOGLEVEL_PRINT);
85 exponent.printraw(os);
86 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
89 void fail::printraw(ostream & os) const
91 debugmsg("fail printraw",LOGLEVEL_PRINT);
95 void expairseq::printraw(ostream & os) const
97 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
100 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
102 (*cit).rest.printraw(os);
104 (*cit).coeff.printraw(os);
110 void add::printraw(ostream & os) const
112 debugmsg("add printraw",LOGLEVEL_PRINT);
115 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
117 (*it).rest.bp->printraw(os);
119 (*it).coeff.bp->printraw(os);
122 os << ",hash=" << hashvalue << ",flags=" << flags;
126 void mul::printraw(ostream & os) const
128 debugmsg("mul printraw",LOGLEVEL_PRINT);
131 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
133 (*it).rest.bp->printraw(os);
135 (*it).coeff.bp->printraw(os);
138 os << ",hash=" << hashvalue << ",flags=" << flags;
142 void ncmul::printraw(ostream & os) const
144 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
147 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
148 (*it).bp->printraw(os);
151 os << ",hash=" << hashvalue << ",flags=" << flags;
155 /*void function::printraw(ostream & os) const
157 * debugmsg("function printraw",LOGLEVEL_PRINT);
159 * os << "function." << name << "(";
160 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
161 * (*it).bp->print(os);
167 void series::printraw(ostream &os) const
169 debugmsg("symbol printraw", LOGLEVEL_PRINT);
170 os << "series(" << var << ";" << point << ";";
171 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
172 os << "(" << (*i).rest << "," << (*i).coeff << "),";
177 void relational::printraw(ostream & os) const
179 debugmsg("relational printraw",LOGLEVEL_PRINT);
201 case greater_or_equal:
205 os << "(INVALID RELATIONAL OPERATOR)";
210 void matrix::printraw(ostream & os) const
212 debugmsg("matrix printraw",LOGLEVEL_PRINT);
213 os << "matrix(" << row << "," << col <<",";
214 for (int r=0; r<row-1; ++r) {
216 for (int c=0; c<col-1; ++c) {
217 os << m[r*col+c] << ",";
219 os << m[col*(r-1)-1] << "),";
222 for (int c=0; c<col-1; ++c) {
223 os << m[(row-1)*col+c] << ",";
225 os << m[row*col-1] << "))";