Macaulay2 Engine
Loading...
Searching...
No Matches
M2::ARingGFFlintBig Class Reference

aring-style adapter for FLINT's polynomial-quotient representation of finite fields GF(p^n) that are too large for Zech tables. More...

#include <aring-gf-flint-big.hpp>

Inheritance diagram for M2::ARingGFFlintBig:
M2::RingInterface our_new_delete

Classes

class  Element
 A wrapper class for ElementType. More...
class  ElementArray
 Fixed-size owned array of fq_nmod_struct slots tied to an ARingGFFlintBig for the matching FLINT context. More...

Public Types

typedef fq_nmod_struct ElementType
typedef ElementType elem
typedef std::vector< elemElementContainerType

Public Member Functions

 ARingGFFlintBig (const PolynomialRing &R, const ring_elem a)
 ~ARingGFFlintBig ()
const fq_nmod_ctx_struct * flintContext () const
long characteristic () const
long dimension () const
const PolynomialRingoriginalRing () const
void getGenerator (ElementType &result_gen) const
void text_out (buffer &o) const
unsigned int computeHashValue (const elem &a) const
 Arithmetic functions ///////.
void to_ring_elem (ring_elem &result, const ElementType &a) const
void from_ring_elem (ElementType &result, const ring_elem &a) const
const ElementTypefrom_ring_elem_const (const ring_elem &a) const
bool is_unit (const ElementType &f) const
bool is_zero (const ElementType &f) const
bool is_equal (const ElementType &f, const ElementType &g) const
int compare_elems (const ElementType &f, const ElementType &g) const
void copy (ElementType &result, const ElementType &a) const
void init (ElementType &result) const
void init_set (ElementType &result, const ElementType &a) const
void set (ElementType &result, const ElementType &a) const
void set_zero (ElementType &result) const
void clear (ElementType &result) const
void set_from_long (ElementType &result, long a) const
void set_var (ElementType &result, int v) 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 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
void power (ElementType &result, const ElementType &a, int n) const
void power_mpz (ElementType &result, const ElementType &a, mpz_srcptr n) const
void swap (ElementType &a, ElementType &b) const
void elem_text_out (buffer &o, const ElementType &a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
void syzygy (const ElementType &a, const ElementType &b, ElementType &x, ElementType &y) const
void random (ElementType &result) const
void fromSmallIntegerCoefficients (ElementType &result, const std::vector< long > &poly) const
void getSmallIntegerCoefficients (const ElementType &a, std::vector< long > &poly) const
bool promote (const Ring *Rf, const ring_elem f, ElementType &result) const
void lift_to_original_ring (ring_elem &result, const ElementType &f) 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

Static Public Attributes

static const RingID ringID = ring_GFFlintBig

Private Attributes

fq_nmod_ctx_t mContext
const PolynomialRingmOriginalRing
const RingElementmPrimitiveElement
unsigned intmPPowers
long mCharacteristic
long mDimension
flint_rand_t mRandomState
ElementType mCachedGenerator
bool mGeneratorComputed

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)

Detailed Description

aring-style adapter for FLINT's polynomial-quotient representation of finite fields GF(p^n) that are too large for Zech tables.

Note
AI-generated documentation. Verify against the source before relying on it.

ElementType is fq_nmod_struct (an nmod_poly_struct modulo the defining polynomial) and every arithmetic call delegates to FLINT's fq_nmod_* routines through the held mContext (fq_nmod_ctx_struct*). Slower per-operation than ARingGFFlint but unconstrained by the Zech-table size, so this is the fallback for GF(p^n) once p^n outgrows the small-field regime. ringID = ring_GFFlintBig for VectorArithmetic dispatch.

Definition at line 87 of file aring-gf-flint-big.hpp.


The documentation for this class was generated from the following files: