From 9e43f4ea07dc7d20be5ce31e8569bbfda4069432 Mon Sep 17 00:00:00 2001 From: Tim King Date: Thu, 3 Jun 2010 18:35:15 +0000 Subject: [PATCH] Adds toString to DeltaRational --- src/theory/arith/delta_rational.cpp | 6 ++++++ src/theory/arith/delta_rational.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/theory/arith/delta_rational.cpp b/src/theory/arith/delta_rational.cpp index 90529529a..0c94b1d08 100644 --- a/src/theory/arith/delta_rational.cpp +++ b/src/theory/arith/delta_rational.cpp @@ -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() + ")"; +} diff --git a/src/theory/arith/delta_rational.h b/src/theory/arith/delta_rational.h index c84a28e3d..4b6e06bc5 100644 --- a/src/theory/arith/delta_rational.h +++ b/src/theory/arith/delta_rational.h @@ -89,6 +89,9 @@ public: return *(this); } + + std::string toString() const; + }; std::ostream& operator<<(std::ostream& os, const DeltaRational& n); -- 2.30.2