|
Macaulay2 Engine
|
aring-style adapter for Z/p using a discrete-log (Zech) representation: every non-zero residue is its index relative to a primitive generator a. More...
#include <aring-zzp.hpp>
Public Types | |
| typedef Z_mod | ring_type |
| typedef int | ElementType |
| typedef int | elem |
| typedef std::vector< elem > | ElementContainerType |
Static Public Member Functions | |
| static int | findPrimitiveRoot (int P) |
| static void | clear (elem &result) |
| 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) |
Static Public Attributes | |
| static const RingID | ringID = ring_ZZp |
Private Member Functions | |
| void | initialize_tables () |
Private Attributes | |
| size_t | charac |
| int | p |
| int | p1 |
| int | minus_one |
| int | prim_root |
| int * | log_table |
| int * | exp_table |
aring-style adapter for Z/p using a discrete-log (Zech) representation: every non-zero residue is its index relative to a primitive generator a.
Encoding: 0 means 0, p-1 means 1, and 1..p-2 are the exponents of a^n mod p covering residues 2..p-1. Multiplication / division collapse to integer add / sub mod p-1 with no table hit; addition uses precomputed exp / log tables. ringID = ring_ZZp. The aring twin of CoefficientRingZZp.
Definition at line 66 of file aring-zzp.hpp.