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; */
31 void ex::printraw(ostream & os) const
33 debugmsg("ex printraw",LOGLEVEL_PRINT);
40 void basic::printraw(ostream & os) const
42 debugmsg("basic printraw",LOGLEVEL_PRINT);
43 os << "[basic object]";
46 void symbol::printraw(ostream & os) const
48 debugmsg("symbol printraw",LOGLEVEL_PRINT);
49 os << "symbol(" << "name=" << name << ",serial=" << serial
50 << ",hash=" << hashvalue << ",flags=" << flags << ")";
53 void constant::printraw(ostream & os) const
55 debugmsg("constant printraw",LOGLEVEL_PRINT);
56 os << "constant(" << name << ")";
59 void power::printraw(ostream & os) const
61 debugmsg("power printraw",LOGLEVEL_PRINT);
66 exponent.printraw(os);
67 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
70 void fail::printraw(ostream & os) const
72 debugmsg("fail printraw",LOGLEVEL_PRINT);
76 void expairseq::printraw(ostream & os) const
78 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
81 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
83 (*cit).rest.printraw(os);
85 (*cit).coeff.printraw(os);
91 void add::printraw(ostream & os) const
93 debugmsg("add printraw",LOGLEVEL_PRINT);
96 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
98 (*it).rest.bp->printraw(os);
100 (*it).coeff.bp->printraw(os);
103 os << ",hash=" << hashvalue << ",flags=" << flags;
107 void mul::printraw(ostream & os) const
109 debugmsg("mul 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 ncmul::printraw(ostream & os) const
125 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
128 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
129 (*it).bp->printraw(os);
132 os << ",hash=" << hashvalue << ",flags=" << flags;
136 /*void function::printraw(ostream & os) const
138 * debugmsg("function printraw",LOGLEVEL_PRINT);
140 * os << "function." << name << "(";
141 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
142 * (*it).bp->print(os);
148 void series::printraw(ostream &os) const
150 debugmsg("symbol printraw", LOGLEVEL_PRINT);
151 os << "series(" << var << ";" << point << ";";
152 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
153 os << "(" << (*i).rest << "," << (*i).coeff << "),";
158 void relational::printraw(ostream & os) const
160 debugmsg("relational printraw",LOGLEVEL_PRINT);
182 case greater_or_equal:
186 os << "(INVALID RELATIONAL OPERATOR)";
191 void matrix::printraw(ostream & os) const
193 debugmsg("matrix printraw",LOGLEVEL_PRINT);
194 os << "matrix(" << row << "," << col <<",";
195 for (int r=0; r<row-1; ++r) {
197 for (int c=0; c<col-1; ++c) {
198 os << m[r*col+c] << ",";
200 os << m[col*(r-1)-1] << "),";
203 for (int c=0; c<col-1; ++c) {
204 os << m[(row-1)*col+c] << ",";
206 os << m[row*col-1] << "))";