Macaulay2 Engine
Loading...
Searching...
No Matches
Monoid Class Reference

Engine-side commutative monomial monoid: variable names, ordering, multidegree machinery, and monomial encoding/decoding. More...

#include <monoid.hpp>

Inheritance diagram for Monoid:
MutableEngineObject our_gc_cleanup our_new_delete

Public Member Functions

 ~Monoid ()
const MonomialOrderinggetMonomialOrdering () const
const PolynomialRingget_degree_ring () const
const Monoiddegree_monoid () const
const_monomial degree_of_var (int v) const
int primary_degree_of_var (int v) const
const std::vector< int > & primary_degree_of_vars () const
const std::vector< int > & get_heft_vector () const
bool primary_degrees_of_vars_positive () const
bool is_group () const
bool is_local () const
bool has_monomials_lt_one () const
int numInvertibleVariables () const
int numNonTermOrderVariables () const
std::vector< intgetFirstWeightVector () const
std::vector< intgetPrimaryDegreeVector () const
bool isLaurentVariable (int i) const
std::vector< boollaurentVariables () const
void text_out (buffer &o) const
int n_vars () const
int max_degree () const
int monomial_size () const
int n_slots (int nparts) const
int num_parts () const
unsigned int computeHashValue (const_monomial m) const
void from_varpower (const_varpower vp, monomial result) const
void to_varpower (const_monomial m, gc_vector< int > &result_vp) const
void from_expvector (const_exponents exp, monomial result) const
void to_expvector (const_monomial m, exponents_t result_exp) const
bool in_subring (int nslots, const_monomial m) const
int compare (int nslots, const_monomial m, const_monomial n) const
monomial make_new (const_monomial d) const
monomial make_one () const
void remove (monomial d) const
bool is_one (const_monomial m) const
bool is_invertible (const_monomial m) const
void one (monomial result) const
void copy (const_monomial m, monomial result) const
void mult (const_monomial m, const_monomial n, monomial result) const
void power (const_monomial m, int n, monomial result) const
int compare (const_monomial m, const_monomial n) const
int partial_compare (int num, const_monomial m, const_monomial n) const
int compare (const_monomial m, int mcomp, const_monomial n, int ncomp) const
bool is_equal (const_monomial m1, const_monomial m2) const
bool divides_partial_order (const_monomial m, const_monomial n) const
bool divides (const_monomial m, const_monomial n) const
void divide (const_monomial m, const_monomial n, monomial result) const
void lcm (const_monomial m, const_monomial n, monomial result) const
void gcd (const_monomial m, const_monomial n, monomial result) const
void monsyz (const_monomial m, const_monomial n, monomial result_sm, monomial result_sn) const
void elem_text_out (buffer &o, const_monomial m, bool p_one=true) const
void multi_degree (const_monomial m, monomial result) const
int primary_degree (const_monomial m) const
template<typename T>
T degree_weights (const_monomial m, const std::vector< T > &wts) const
int degree_weights (const_monomial m, const std::vector< int > &wts) const
int simple_degree (const_monomial m) const
void degree_of_varpower (const_varpower vp, monomial result) const
template<typename T>
void degree_of_expvector (const T *expvector, monomial result) const
bool weight_value_exists () const
long first_weight_value (const_monomial m) const
Public Member Functions inherited from MutableEngineObject
 MutableEngineObject ()
virtual ~MutableEngineObject ()
unsigned int hash () const
Public Member Functions inherited from our_gc_cleanup
 our_gc_cleanup ()
virtual ~our_gc_cleanup ()

Static Public Member Functions

static Monoidcreate (const MonomialOrdering *mo, const PolynomialRing *DR, const std::vector< std::string > &names, const std::vector< int > &degs, const std::vector< int > &hefts)
static void set_trivial_monoid_degree_ring (const PolynomialRing *DR)
static Monoidget_trivial_monoid ()
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)

Private Types

enum  overflow_type { OVER , OVER1 , OVER2 , OVER4 }

Private Member Functions

void set_degrees ()
 sets mHeftDegrees and mDegreeOfVar
void set_overflow_flags ()
 used for preventing overflows
 Monoid ()
 constructors
 Monoid (const MonomialOrdering *mo, const PolynomialRing *DR, const std::vector< std::string > names, const std::vector< int > degs, const std::vector< int > hefts)

Private Attributes

const MonoidmDegreeMonoid
const PolynomialRingmDegreeRing
const MonomialOrderingmo_
 the monomial ordering of the variables
MonomialOrder * monorder_
const int mVariableCount
 number of variables
const std::vector< std::string > mVariableNames
 names of variables
const std::vector< intmDegrees
 length mVariableCount * (length of a single degree vector)
const std::vector< intmHeftVector
 length of a single degree vector
std::vector< intmHeftDegrees
 length mVariableCount
gc_vector< const_monomialmDegreeOfVar
size_t exp_size
int monomial_size_
 size of an encoded monomial
int monomial_bound_
int first_weights_slot_
int n_invertible_vars_
 number of invertible variables
int n_before_component_
 indicates where the free module components are in the monomial order
int n_after_component_
bool component_up_
 indicates whether free module components are ordered lexicographically
std::vector< intlocal_vars
 These are the variables which are < 1 in the monomial order.
std::vector< boolmLaurentVariablesPredicate
 These are the variables which can have negative exponents.
gc_vector< intnslots_
 number of slots per monomial order block
enum Monoid::overflow_typeoverflow

Static Private Attributes

static Monoidtrivial_monoid = nullptr
 the trivial monoid

Detailed Description

Engine-side commutative monomial monoid: variable names, ordering, multidegree machinery, and monomial encoding/decoding.

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

Owns the front-end MonomialOrdering* mo_ plus its compiled MonomialOrder* monorder_ form, the variable count and names, the per-variable multidegrees, the heft vector, and (recursively) a mDegreeMonoid describing how degrees themselves are structured. Exposes the operations rings reduce against (mult, divide, lcm, gcd, compare, is_one, plus encode / decode between exponent vectors and packed monomial words). The commutative counterpart of FreeMonoid in the NC stack.

Definition at line 88 of file monoid.hpp.


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