summaryrefslogtreecommitdiff
path: root/src/util/integer_gmp_imp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/integer_gmp_imp.h')
-rw-r--r--src/util/integer_gmp_imp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/integer_gmp_imp.h b/src/util/integer_gmp_imp.h
index 74b4adad0..f5254a3d2 100644
--- a/src/util/integer_gmp_imp.h
+++ b/src/util/integer_gmp_imp.h
@@ -400,10 +400,20 @@ public:
}
static void extendedGcd(Integer& g, Integer& s, Integer& t, const Integer& a, const Integer& b){
+ //see the documentation for:
//mpz_gcdext (mpz_t g, mpz_t s, mpz_t t, mpz_t a, mpz_t b);
mpz_gcdext (g.d_value.get_mpz_t(), s.d_value.get_mpz_t(), t.d_value.get_mpz_t(), a.d_value.get_mpz_t(), b.d_value.get_mpz_t());
}
+ /** Returns a reference to the minimum of two integers. */
+ static const Integer& min(const Integer& a, const Integer& b){
+ return (a <=b ) ? a : b;
+ }
+
+ /** Returns a reference to the maximum of two integers. */
+ static const Integer& max(const Integer& a, const Integer& b){
+ return (a >= b ) ? a : b;
+ }
friend class CVC4::Rational;
};/* class Integer */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback