summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-06-03 18:35:15 +0000
committerTim King <taking@cs.nyu.edu>2010-06-03 18:35:15 +0000
commit9e43f4ea07dc7d20be5ce31e8569bbfda4069432 (patch)
treea740b6ca04e8c2d3e9827f3db15f5a5220042918 /src
parent65eb6421b58ab943414749251a63b85f34e801ec (diff)
Adds toString to DeltaRational
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/delta_rational.cpp6
-rw-r--r--src/theory/arith/delta_rational.h3
2 files changed, 9 insertions, 0 deletions
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);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback