Macaulay2 Engine
Loading...
Searching...
No Matches
monoid.h
Go to the documentation of this file.
1#ifndef _monoid_h_
2# define _monoid_h_
3
43
44# include "engine-includes.hpp"
45
46// TODO: make this unnecessary
47# if defined(__cplusplus)
48class Ring;
49class Monoid;
51# else
52typedef struct Ring Ring;
53typedef struct Monoid Monoid;
55# endif
56
60
61# if defined(__cplusplus)
62extern "C" {
63# endif
64
65/* integer types to be used for degrees and exponents */
66typedef int32_t deg_t;
67typedef const deg_t *const_monomial;
68
69/* rawMonoid(): always returns the same object */
71
72/* rawMonoid(mo, deg_ring, names, degrees, heftvec) */
73const Monoid * /* or Null */ rawMonoid(const MonomialOrdering *mo,
74 const Ring *deg_ring,
75 M2_ArrayString names,
76 M2_arrayint degrees,
77 M2_arrayint heftvec);
78// TODO: this is wrong and needs to be updated
79/* This function will return NULL if the monomial order cannot be handled
80 currently, if the first components for each degree are not all
81 positive, or under various other "internal" error conditions */
82
84
85/* connected to the interpreter in d/basic.d */
86unsigned int rawMonoidHash(const Monoid *M);
87/* Assigned sequentially */
88
89/* connected to the interpreter in d/actors4.d */
90M2_string rawMonoidToString(const Monoid *M);
91/* For debugging purposes */
92
93/* Service routine for converting degree monomials to int arrays.
94 To be used only by other interface routines. */
96
97# if defined(__cplusplus)
98}
99# endif
100
101#endif /* _monoid_h_ */
102
103// Local Variables:
104// indent-tabs-mode: nil
105// End:
Engine-side commutative monomial monoid: variable names, ordering, multidegree machinery,...
Definition monoid.hpp:89
xxx xxx xxx
Definition ring.hpp:102
Engine-wide include prelude — a single point of truth for portability shims.
int32_t deg_t
Definition imonorder.hpp:43
const int * const_monomial
Definition imonorder.hpp:45
M2_arrayint to_degree_vector(const Monoid *M, const_monomial d)
Definition monoid.cpp:46
int rawMonoidNumberOfBlocks(const Monoid *M)
Definition monoid.cpp:35
const Monoid * rawMonoid(const MonomialOrdering *mo, const Ring *deg_ring, M2_ArrayString names, M2_arrayint degrees, M2_arrayint heftvec)
Definition monoid.cpp:16
unsigned int rawMonoidHash(const Monoid *M)
Definition monoid.cpp:37
const Monoid * rawTrivialMonoid()
Definition monoid.cpp:11
M2_string rawMonoidToString(const Monoid *M)
Definition monoid.cpp:39
Front-end-side description of a monomial ordering as a list of mon_part blocks.