Macaulay2 Engine
Loading...
Searching...
No Matches
monomial-ordering.h
Go to the documentation of this file.
1#ifndef _monomial_ordering_h_
2# define _monomial_ordering_h_
3
50
51# include "engine-includes.hpp"
52
54
58
60 MO_LEX = 1,
71 MO_LAURENT = 12, /* Lex order here */
72 MO_LAURENT_REVLEX = 13, /* Rev lex order here */
73 MO_NC_LEX = 14, /* Lex order, non-commutative */
76};
77
78typedef struct mon_part_rec_
79{
81 int nvars;
82 int *wts;
83} * mon_part;
84
100{
101 unsigned int _hash;
102 unsigned int len;
103 mon_part array[1];
104};
105
106# if defined(__cplusplus)
107extern "C" {
108# endif
109
110MonomialOrdering *rawLexMonomialOrdering(int nvars, int packing);
111/* drg: connected rawMonomialOrdering*/
112/* Lex, LexSmall, LexTiny */
113
115 int packing);
116/* drg: connected rawMonomialOrdering*/
117/* GRevLex, GrevLexSmall, GRevLexTiny */
118
120/* drg: connected rawMonomialOrdering*/
121/* RevLex => n */
122
124/* drg: connected rawMonomialOrdering*/
125/* Weights => {...} */
126
128/* drg: connected rawMonomialOrdering*/
129/* GroupLex => n */
130
132/* GroupRevLex => n */
133
135/* drg: connected rawMonomialOrdering*/
136/* NCLex => n */
137
139/* drg: connected rawMonomialOrdering */
140/* argument of true: Position => Up, (should be the default)
141 * argument of false: Position => Down
142 */
143
145 engine_RawMonomialOrderingArray mo);
146/* drg: connected rawMonomialOrdering*/
147/* for tensor products */
148
149MonomialOrdering *rawJoinMonomialOrdering(engine_RawMonomialOrderingArray mo);
150/* drg: connected rawMonomialOrdering*/
151/* default, when making monoids and polynomial rings */
152
154/* drg: connected rawNumberOfVariables*/
155
157/* drg: connected rawNumberOfInvertibleVariables*/
158
160/* Dan: PLEASE CONNECT */
161/* Returns an array of the indices of those variables which are less than 1 in
162 the monomial ordering. If this number is > 0, then the monomial ordering is
163 not a term order, and local (tangent cone) algorithms must be used for GB's
164 */
165
167/* drg: connected */
168
169unsigned int rawMonomialOrderingHash(const MonomialOrdering *mo);
170/* drg: connected hash */
171/* Assigned sequentially */
172
173int moIsGRevLex(const struct MonomialOrdering *mo);
174
175int moIsLex(const struct MonomialOrdering *mo);
176
178
180 const struct MonomialOrdering *mo);
181/* return a (flattened) matrix corresponding to the monomial ordering 'mo'.
182 Appended to this sequence of integers is 3 further numbers:
183 (1) If the tie-breaker is revlex, one further value of "1" is added, else if
184 it is lex, one further value of "0" is added. (2) If the module order is
185 Position=>Up, then 0 else 1 in the next spot. (3) If the modules part of the
186 order is considered right before the ith row of this matrix then "i" is in
187 the next spot. (i=#rows, f the module component is considered last). The
188 returned value represents a matrix with #vars columns, and #gradings weights,
189 in row-major order (each row is contiguous in memory), plus the three extra
190 entries. NULL is returned if 'mo' corresponds to a non-commutative monoid, or
191 has "Inverses=>true" set.
192*/
193
194# if defined(__cplusplus)
195}
196# endif
197
198#endif /* _monomial-ordering_h_ */
199
200// Local Variables:
201// indent-tabs-mode: nil
202// End:
Engine-wide include prelude — a single point of truth for portability shims.
M2_arrayint M2_arrayintOrNull
Definition m2-types.h:99
char M2_bool
Definition m2-types.h:82
M2_arrayint moGetWeightValues(const struct MonomialOrdering *mo)
MonomialOrdering * rawRevLexMonomialOrdering(int nvars)
MonomialOrdering * rawNClexMonomialOrdering(int nvars)
int rawNumberOfInvertibleVariables(const MonomialOrdering *mo)
unsigned int rawMonomialOrderingHash(const MonomialOrdering *mo)
int moIsLex(const struct MonomialOrdering *mo)
int moIsGRevLex(const struct MonomialOrdering *mo)
M2_arrayint rawNonTermOrderVariables(const MonomialOrdering *mo)
MonomialOrdering * rawJoinMonomialOrdering(engine_RawMonomialOrderingArray mo)
M2_arrayintOrNull rawMonomialOrderingToMatrix(const struct MonomialOrdering *mo)
MonomialOrdering * rawGroupLexMonomialOrdering(int nvars)
MonomialOrdering * rawLexMonomialOrdering(int nvars, int packing)
MonomialOrdering * rawGroupRevLexMonomialOrdering(int nvars)
M2_string IM2_MonomialOrdering_to_string(const MonomialOrdering *mo)
MonomialOrdering * rawWeightsMonomialOrdering(M2_arrayint wts)
MonomialOrdering * rawGRevLexMonomialOrdering(M2_arrayint degs, int packing)
MonomialOrdering * rawProductMonomialOrdering(engine_RawMonomialOrderingArray mo)
MonomialOrdering * rawPositionMonomialOrdering(M2_bool up_or_down)
int rawNumberOfVariables(const MonomialOrdering *mo)
MonomialOrdering_type
@ MO_GREVLEX4_WTS
@ MO_LAURENT_REVLEX
@ MO_NC_LEX
@ MO_LEX4
@ MO_REVLEX
@ MO_POSITION_UP
@ MO_LEX
@ MO_GREVLEX
@ MO_LEX2
@ MO_GREVLEX4
@ MO_LAURENT
@ MO_GREVLEX2_WTS
@ MO_WEIGHTS
@ MO_POSITION_DOWN
@ MO_GREVLEX2
@ MO_GREVLEX_WTS
Front-end-side description of a monomial ordering as a list of mon_part blocks.
enum MonomialOrdering_type type