|
Macaulay2 Engine
|
wrapper for the mpz_struct integer representation More...
#include <aring-zz-gmp.hpp>
Public Types | |
| typedef __mpz_struct | ElementType |
| typedef ElementType | elem |
Public Member Functions | |
| ARingZZGMP () | |
| ~ARingZZGMP () | |
| size_t | characteristic () const |
| size_t | cardinality () const |
| unsigned int | computeHashValue (const elem &a) const |
| bool | promote (const Ring *Rf, const ring_elem f, ElementType &result) const |
| bool | lift (const Ring *Rg, const ElementType &f, ring_elem &result) const |
| void | eval (const RingMap *map, const ElementType &f, int first_var, ring_elem &result) const |
| bool | coerceToLongInteger (long &result, const ElementType &n) const |
properties | |
| bool | is_unit (const ElementType &f) const |
| bool | is_zero (const ElementType &f) const |
operators | |
| bool | is_equal (const ElementType &f, const ElementType &g) const |
| int | compare_elems (const ElementType &f, const ElementType &g) const |
arithmetic | |
| void | negate (ElementType &result, const ElementType &a) const |
| void | invert (ElementType &result, const ElementType &a) const |
| void | add (ElementType &result, const ElementType &a, const ElementType &b) const |
| void | subtract (ElementType &result, const ElementType &a, const ElementType &b) const |
| void | subtract_multiple (ElementType &result, const ElementType &a, const ElementType &b) const |
| void | mult (ElementType &result, const ElementType &a, const ElementType &b) const |
| void | divide (ElementType &result, const ElementType &a, const ElementType &b) const |
| exact division of integers. | |
| void | power (ElementType &result, const ElementType &a, unsigned long n) const |
| void | power_mpz (ElementType &result, const ElementType &a, mpz_srcptr n) const |
| void | syzygy (const ElementType &a, const ElementType &b, ElementType &x, ElementType &y) const |
misc | |
| void | swap (ElementType &a, ElementType &b) const |
| void | random (ElementType &result) const |
IO | |
| void | text_out (buffer &o) const |
| void | elem_text_out (buffer &o, const ElementType &a, bool p_one=true, bool p_plus=false, bool p_parens=false) const |
translation functions | |
| void | to_ring_elem (ring_elem &result, const ElementType &a) const |
| void | from_ring_elem (ElementType &result, const ring_elem &a) const |
| const ElementType & | from_ring_elem_const (const ring_elem &a) const |
Static Public Attributes | |
| static const RingID | ringID = ring_ZZ |
init_set | |
| void | init_set (ElementType &result, const ElementType &a) const |
| void | init (ElementType &result) const |
| void | set (ElementType &result, const ElementType &a) const |
| void | set_zero (ElementType &result) const |
| void | set_from_long (ElementType &result, long a) const |
| void | set_from_mpz (ElementType &result, mpz_srcptr a) const |
| bool | set_from_mpq (ElementType &result, mpq_srcptr a) const |
| bool | set_from_BigReal (ElementType &result, gmp_RR a) const |
| void | set_var (ElementType &result, int v) const |
| static void | clear (ElementType &result) |
Additional Inherited Members | |
| Static Public Member Functions inherited from our_new_delete | |
| static void * | operator new (size_t size) |
| static void * | operator new[] (size_t size) |
| static void | operator delete (void *obj) |
| static void | operator delete[] (void *obj) |
| static void * | operator new (size_t size, void *existing_memory) |
| static void * | operator new[] (size_t size, void *existing_memory) |
| static void | operator delete (void *obj, void *existing_memory) |
| static void | operator delete[] (void *obj, void *existing_memory) |
wrapper for the mpz_struct integer representation
Definition at line 58 of file aring-zz-gmp.hpp.