3 * print in ugly raw format, so brave developers can have a look at the
4 * underlying structure. */
6 /* We are cheating here, because we don't want to include the underlying
7 * bignum package's headers again, so in this file we omit the definition of
8 * void numeric::printraw(ostream & os) const; */
14 void ex::printraw(ostream & os) const
16 debugmsg("ex printraw",LOGLEVEL_PRINT);
23 void basic::printraw(ostream & os) const
25 debugmsg("basic printraw",LOGLEVEL_PRINT);
26 os << "[basic object]";
29 void symbol::printraw(ostream & os) const
31 debugmsg("symbol printraw",LOGLEVEL_PRINT);
32 os << "symbol(" << "name=" << name << ",serial=" << serial
33 << ",hash=" << hashvalue << ",flags=" << flags << ")";
36 void constant::printraw(ostream & os) const
38 debugmsg("constant printraw",LOGLEVEL_PRINT);
39 os << "constant(" << name << ")";
42 void power::printraw(ostream & os) const
44 debugmsg("power printraw",LOGLEVEL_PRINT);
49 exponent.printraw(os);
50 os << ",hash=" << hashvalue << ",flags=" << flags << ")";
53 void fail::printraw(ostream & os) const
55 debugmsg("fail printraw",LOGLEVEL_PRINT);
59 void expairseq::printraw(ostream & os) const
61 debugmsg("expairseq printraw",LOGLEVEL_PRINT);
64 for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
66 (*cit).rest.printraw(os);
68 (*cit).coeff.printraw(os);
74 void add::printraw(ostream & os) const
76 debugmsg("add printraw",LOGLEVEL_PRINT);
79 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
81 (*it).rest.bp->printraw(os);
83 (*it).coeff.bp->printraw(os);
86 os << ",hash=" << hashvalue << ",flags=" << flags;
90 void mul::printraw(ostream & os) const
92 debugmsg("mul printraw",LOGLEVEL_PRINT);
95 for (epvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
97 (*it).rest.bp->printraw(os);
99 (*it).coeff.bp->printraw(os);
102 os << ",hash=" << hashvalue << ",flags=" << flags;
106 void ncmul::printraw(ostream & os) const
108 debugmsg("ncmul printraw",LOGLEVEL_PRINT);
111 for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
112 (*it).bp->printraw(os);
115 os << ",hash=" << hashvalue << ",flags=" << flags;
119 /*void function::printraw(ostream & os) const
121 * debugmsg("function printraw",LOGLEVEL_PRINT);
123 * os << "function." << name << "(";
124 * for (exvector::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
125 * (*it).bp->print(os);
131 void series::printraw(ostream &os) const
133 debugmsg("symbol printraw", LOGLEVEL_PRINT);
134 os << "series(" << var << ";" << point << ";";
135 for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
136 os << "(" << (*i).rest << "," << (*i).coeff << "),";
141 void relational::printraw(ostream & os) const
143 debugmsg("relational printraw",LOGLEVEL_PRINT);
165 case greater_or_equal:
169 os << "(INVALID RELATIONAL OPERATOR)";
174 void matrix::printraw(ostream & os) const
176 debugmsg("matrix printraw",LOGLEVEL_PRINT);
177 os << "matrix(" << row << "," << col <<",";
178 for (int r=0; r<row-1; ++r) {
180 for (int c=0; c<col-1; ++c) {
181 os << m[r*col+c] << ",";
183 os << m[col*(r-1)-1] << "),";
186 for (int c=0; c<col-1; ++c) {
187 os << m[(row-1)*col+c] << ",";
189 os << m[row*col-1] << "))";