- Overwritten: pseries::printtree().
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Tue, 18 Apr 2000 13:46:03 +0000 (13:46 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Tue, 18 Apr 2000 13:46:03 +0000 (13:46 +0000)
ginac/pseries.cpp
ginac/pseries.h

index 035551d8889ab0f2bef95853d18bd8117c53dd70..277cef18a10253504f6eaf0e708718fba53cb50e 100644 (file)
@@ -178,6 +178,23 @@ void pseries::printraw(ostream &os) const
        os << ")";
 }
 
+void pseries::printtree(ostream & os, unsigned indent) const
+{
+    debugmsg("pseries printtree",LOGLEVEL_PRINT);
+    os << string(indent,' ') << "pseries " 
+       << ", hash=" << hashvalue << " (0x" << hex << hashvalue << dec << ")"
+       << ", flags=" << flags << endl;
+    for (unsigned i=0; i<seq.size(); ++i) {
+        seq[i].rest.printtree(os,indent+delta_indent);
+        seq[i].coeff.printtree(os,indent+delta_indent);
+        if (i!=seq.size()-1) {
+            os << string(indent+delta_indent,' ') << "-----" << endl;
+        }
+    }
+    var.printtree(os, indent+delta_indent);
+    point.printtree(os, indent+delta_indent);
+}
+
 unsigned pseries::nops(void) const
 {
     return seq.size();
index db79e141cddf55f2e727761ee7e5a15d50ebdd3e..9346c2556f8de5291d1aa3b040a3b8cccfac1edf 100644 (file)
@@ -57,6 +57,7 @@ public:
     basic *duplicate() const;
     void print(ostream &os, unsigned upper_precedence=0) const;
     void printraw(ostream &os) const;
+    void printtree(ostream & os, unsigned indent) const;
     unsigned nops(void) const;
     ex op(int i) const;
     ex &let_op(int i);