Adds toString to DeltaRational
authorTim King <taking@cs.nyu.edu>
Thu, 3 Jun 2010 18:35:15 +0000 (18:35 +0000)
committerTim King <taking@cs.nyu.edu>
Thu, 3 Jun 2010 18:35:15 +0000 (18:35 +0000)
src/theory/arith/delta_rational.cpp
src/theory/arith/delta_rational.h

index 90529529ad6463b503c8cde421f54ac4df9b2202..0c94b1d0804bbf0958f96a3321aeee3d60b0b16b 100644 (file)
@@ -8,3 +8,9 @@ std::ostream& CVC4::operator<<(std::ostream& os, const DeltaRational& dq){
   return os << "(" << dq.getNoninfintestimalPart()
             << "," << dq.getInfintestimalPart() << ")";
 }
+
+
+std::string DeltaRational::toString() const {
+  return "(" + getNoninfintestimalPart().toString() + "," +
+    getInfintestimalPart().toString() + ")";
+}
index c84a28e3d2efa4463c37b078f3992e43e02ec864..4b6e06bc544bc2a5cc2446fd34cdf720e2887a45 100644 (file)
@@ -89,6 +89,9 @@ public:
 
     return *(this);
   }
+
+  std::string toString() const;
+
 };
 
 std::ostream& operator<<(std::ostream& os, const DeltaRational& n);