summaryrefslogtreecommitdiff
path: root/src/util/integer_gmp_imp.h
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2017-11-06 03:22:44 -0800
committerGitHub <noreply@github.com>2017-11-06 03:22:44 -0800
commitd1467e740c17fe500bd598375165c2018305e0b3 (patch)
tree2ff44662c0af672a65970446bf6e011cd62777db /src/util/integer_gmp_imp.h
parentd72fcccb19e43d0140b8a6ac954c2858dd3a239a (diff)
Add getValue() for Rational and Integer (GMP and CLN). (#1309)
Returns a copy of d_value to enable public access of GMP and CLN data.
Diffstat (limited to 'src/util/integer_gmp_imp.h')
-rw-r--r--src/util/integer_gmp_imp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/integer_gmp_imp.h b/src/util/integer_gmp_imp.h
index 0d0735127..5f676dbc5 100644
--- a/src/util/integer_gmp_imp.h
+++ b/src/util/integer_gmp_imp.h
@@ -78,6 +78,14 @@ public:
~Integer() {}
+ /**
+ * Returns a copy of d_value to enable public access of GMP data.
+ */
+ mpz_class getValue() const
+ {
+ return d_value;
+ }
+
Integer& operator=(const Integer& x){
if(this == &x) return *this;
d_value = x.d_value;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback