summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-12-07 00:20:22 +0100
committerKevin Ryde <user42@zip.com.au>2001-12-07 00:20:22 +0100
commit17ffcfbba9e095c5d92c8e86bc3e952c2bf12832 (patch)
tree5d69160f0ba989cd7cd049c7efa0562c6c653249
parent45956e3ce3f241186a21ec222f23e9d3a3ac3c19 (diff)
downloadgmp-17ffcfbba9e095c5d92c8e86bc3e952c2bf12832.tar.gz
* gmpxx.h (gmp_randclass): Add constructors for gmp_randinit_default
and gmp_randinit_lc_2exp_size.
-rw-r--r--gmpxx.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gmpxx.h b/gmpxx.h
index 2911d4f63..320652306 100644
--- a/gmpxx.h
+++ b/gmpxx.h
@@ -5030,11 +5030,22 @@ public:
break;
}
}
+
+ // gmp_randinit_default
+ gmp_randclass(void (*f)(gmp_randstate_t))
+ { f(state); }
+
+ // gmp_randinit_lc_2exp
gmp_randclass(void (*f)(gmp_randstate_t, mpz_srcptr,
unsigned long int, unsigned long int),
mpz_class z, unsigned long int l1, unsigned long int l2)
{ f(state, z.get_mpz_t(), l1, l2); }
+ // gmp_randinit_lc_2exp_size
+ gmp_randclass(int (*f)(gmp_randstate_t, unsigned long int),
+ unsigned long int size)
+ { f(state, size); }
+
~gmp_randclass() { gmp_randclear(state); }
// initialize