Macaulay2 Engine
Loading...
Searching...
No Matches

◆ random()

ring_elem RingZZ::random ( ) const
virtual

Reimplemented from Ring.

Definition at line 70 of file ZZ.cpp.

70 {
71 mpz_ptr result = new_elem();
74 return ring_elem(result);
75}
mpz_ptr new_elem() const
Definition ZZ.cpp:34
void mpz_reallocate_limbs(mpz_ptr _z)
Definition gmp-util.h:46
VALGRIND_MAKE_MEM_DEFINED & result(result)
void rawSetRandomInteger(mpz_ptr result, gmp_ZZ maxN)
Definition random.cpp:56

References mpz_reallocate_limbs(), new_elem(), rawSetRandomInteger(), and result().