3 * print in ugly raw format, so brave developers can have a look at the
4 * underlying structure.
6 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* We are cheating here, because we don't want to include the underlying
24 * bignum package's headers again, so in this file we omit the definition of
25 * void numeric::printraw(ostream & os) const; */
33 #include "expairseq.h"
42 #include "relational.h"
46 void ex::printraw(ostream & os) const
48 debugmsg("ex printraw",LOGLEVEL_PRINT);
55 void basic::printraw(ostream & os) const
57 debugmsg("basic printraw",LOGLEVEL_PRINT);
58 os << "[basic object]";
61 void symbol::printraw(ostream & os) const
63 debugmsg("symbol printraw",LOGLEVEL_PRINT);
64 os << "symbol(" << "name=" << name << ",serial=" << serial
65 << ",hash=" << hashvalue << ",flags=" << flags << ")";
68 void constant::printraw(ostream & os) const
70 debugmsg("constant printraw",LOGLEVEL_PRINT);
71 os << "constant(" << name << ")";
74 void power::printraw(ostream & os) const
76 debugmsg("power printraw",LOGLEVEL_PRINT);
81 exponent.printraw(os);
82 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
85 void fail::printraw(ostream & os) const
87 debugmsg("fail printraw",LOGLEVEL_PRINT);
91 void expairseq::printraw(ostream & os) const
93 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
96 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
98 (*cit).rest.printraw(os);
100 (*cit).coeff.printraw(os);
106 void add::printraw(ostream & os) const
108 debugmsg("add printraw",LOGLEVEL_PRINT);
111 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
113 (*it).rest.bp->printraw(os);
115 (*it).coeff.bp->printraw(os);
118 os << ",hash=" << hashvalue << ",flags=" << flags;
122 void mul::printraw(ostream & os) const
124 debugmsg("mul printraw",LOGLEVEL_PRINT);
127 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
129 (*it).rest.bp->printraw(os);
131 (*it).coeff.bp->printraw(os);
134 os << ",hash=" << hashvalue << ",flags=" << flags;
138 void ncmul::printraw(ostream & os) const
140 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
143 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
144 (*it).bp->printraw(os);
147 os << ",hash=" << hashvalue << ",flags=" << flags;
151 /*void function::printraw(ostream & os) const
153 * debugmsg("function printraw",LOGLEVEL_PRINT);
155 * os << "function." << name << "(";
156 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
157 * (*it).bp->print(os);
163 void series::printraw(ostream &os) const
165 debugmsg("symbol printraw", LOGLEVEL_PRINT);
166 os << "series(" << var << ";" << point << ";";
167 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
168 os << "(" << (*i).rest << "," << (*i).coeff << "),";
173 void relational::printraw(ostream & os) const
175 debugmsg("relational printraw",LOGLEVEL_PRINT);
197 case greater_or_equal:
201 os << "(INVALID RELATIONAL OPERATOR)";
206 void matrix::printraw(ostream & os) const
208 debugmsg("matrix printraw",LOGLEVEL_PRINT);
209 os << "matrix(" << row << "," << col <<",";
210 for (int r=0; r<row-1; ++r) {
212 for (int c=0; c<col-1; ++c) {
213 os << m[r*col+c] << ",";
215 os << m[col*(r-1)-1] << "),";
218 for (int c=0; c<col-1; ++c) {
219 os << m[(row-1)*col+c] << ",";
221 os << m[row*col-1] << "))";