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

aring-style coefficient ring for tower polynomial rings (Z/p)[x_0][x_1]...[x_{n-1}] modulo a chain of extensions. More...

#include <aring-tower.hpp>

Inheritance diagram for M2::ARingTower:
M2::RingInterface our_new_delete

Classes

class  Element
 A wrapper class for ElementType. More...
class  ElementArray
 Fixed-size, owned array of ElementTypes for the linear-algebra templates that want a flat buffer of tower-polynomial slots. More...

Public Types

typedef ARingZZpFFPACK BaseRingType
typedef BaseRingType::ElementType BaseCoefficientType
typedef ARingPolynomial ElementType
typedef ElementType elem

Public Member Functions

 ARingTower (const BaseRingType &baseRing, const std::vector< std::string > &names, const std::vector< ElementType > &extensions)
virtual ~ARingTower ()
size_t n_vars () const
const ARingZZpFFPACKbaseRing () const
const std::vector< std::string > & varNames () const
unsigned long characteristic () const
unsigned int computeHashValue (const elem &a) const
void text_out (buffer &o) const
void init_set (elem &result, elem a) const
void set (elem &result, elem a) const
bool is_unit (ElementType f) const
bool is_zero (ElementType f) const
bool is_equal (ElementType f, ElementType g) const
int compare_elems (ElementType f, ElementType g) const
void to_ring_elem (ring_elem &result, const ElementType &a) const
void from_ring_elem (ElementType &result, const ring_elem &a) const
ElementType from_ring_elem_const (const ring_elem &a) const
void init (elem &result) const
void clear (elem &f) const
void set_zero (elem &result) const
void copy (elem &result, elem a) const
void set_from_long (elem &result, long a) const
void set_var (elem &result, int v) const
void set_from_mpz (elem &result, mpz_srcptr a) const
bool set_from_mpq (elem &result, mpq_srcptr a) const
bool set_from_BigReal (elem &result, gmp_RR a) const
void negate (elem &result, elem a) const
void invert (elem &result, elem a) const
void add (elem &result, elem a, elem b) const
void subtract (elem &result, elem a, elem b) const
void subtract_multiple (elem &result, elem a, elem b) const
void mult (elem &result, elem a, elem b) const
void divide (elem &result, elem a, elem b) const
void power (elem &result, elem a, int n) const
void power_mpz (elem &result, elem a, mpz_srcptr n) const
void swap (ElementType &a, ElementType &b) const
void elem_text_out (buffer &o, ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
void syzygy (ElementType a, ElementType b, ElementType &x, ElementType &y) const
void random (ElementType &result) const
void eval (const RingMap *map, const elem f, int first_var, ring_elem &result) const
void mult_by_coeff (ARingPolynomial &f, const BaseCoefficientType &b) const

Static Public Member Functions

static ARingTowercreate (const BaseRingType &baseRing, const std::vector< std::string > &names)
static ARingTowercreate (const ARingTower &R, const std::vector< std::string > &new_names)
static ARingTowercreate (const ARingTower &R, const std::vector< ElementType > &extensions)
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_tower_ZZp

Private Member Functions

void extensions_text_out (buffer &o) const
void elem_text_out (buffer &o, int level, const ElementType f, bool p_one, bool p_plus, bool p_parens) const
bool is_one (int level, const ARingPolynomial f) const
bool is_equal (int level, const ARingPolynomial f, const ARingPolynomial g) const
ARingPolynomial alloc_poly_n (int deg) const
ARingPolynomial alloc_poly_0 (int deg) const
void dealloc_poly (ARingPolynomial &f) const
ARingPolynomial copy (int level, const ARingPolynomial f) const
void increase_capacity (int newdeg, ARingPolynomial &f) const
void reset_degree (ARingPolynomial &f) const
ARingPolynomial var (int level, int v) const
void add_in_place (int level, ARingPolynomial &f, const ARingPolynomial g) const
void subtract_in_place (int level, ARingPolynomial &f, const ARingPolynomial g) const
void negate_in_place (int level, ARingPolynomial &f) const
void mult_by_coeff (int level, ARingPolynomial &f, const BaseCoefficientType &b) const
void clear (int level, ARingPolynomial &f) const

Private Attributes

const ARingZZpFFPACKmBaseRing
int mStartLevel
int mNumVars
const std::vector< std::string > mVarNames
std::vector< ElementTypemExtensions

Friends

class ARingTowerEvaluator

Detailed Description

aring-style coefficient ring for tower polynomial rings (Z/p)[x_0][x_1]...[x_{n-1}] modulo a chain of extensions.

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

The aring analogue of DRing (see dpoly.hpp): bundles a base ARingZZpFFPACK ring with a list of variable names and a vector of extensions (one tower polynomial per algebraic level, nullptr for transcendental). ElementType is ARingPolynomial, and the nested Element and ElementArray helpers manage the underlying heap-allocated chains. Hardcoded to ARingZZpFFPACK for now (TODO: template on base ring), and tagged with ringID = ring_tower_ZZp so the engine can recognise it.

Definition at line 109 of file aring-tower.hpp.


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