Macaulay2 Engine
Loading...
Searching...
No Matches
imonorder.hpp
Go to the documentation of this file.
1// Copyright 2009 Michael E. Stillman
2
3#ifndef __imonorder_h_
4#define __imonorder_h_
5
33
34#include <vector>
35
37
38#include "ExponentVector.hpp"
39
40typedef int *monomial;
41
42typedef int32_t
43 deg_t; // this is the integer type to use for degrees and weights
44
45typedef const int *const_monomial;
46
57
75{
76 int nvars;
77 int nslots;
81 int component_up; /* bool */
82 deg_t
83 *degs; /* 0..nvars: heuristic degree of each variable. degs[nvars] = 1.
84 Assumption: degs[i] >= 1, for all i, and should be an integer.
85 Any graded rev lex block assumes graded wrt these degrees. */
86 struct mo_block *blocks; /* 0..nblocks-1 with each entry a struct mo_block */
87 int *is_laurent; /* 0..nvars-1: 0 or 1: 1 means negative exponents allowed */
88};
89
90typedef struct MonomialOrder_rec MonomialOrder;
91MonomialOrder *monomialOrderMake(const MonomialOrdering *mo);
92void monomialOrderFree(MonomialOrder *mo);
93void monomialOrderEncodeFromActualExponents(const MonomialOrder *mo,
95 monomial b);
96void monomialOrderDecodeToActualExponents(const MonomialOrder *mo,
98 exponents_t b);
99
100std::vector<bool> laurentVariables(const MonomialOrder* mo);
101#endif
102
103/*
104// Local Variables:
105// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
106// indent-tabs-mode: nil
107// End:
108*/
exponents::ConstExponents const_exponents
exponents::Exponents exponents_t
Dense exponent-vector template [e_0, ..., e_{nvars-1}] for monomial operations.
#define monomial
Definition gb-toric.cpp:11
int32_t deg_t
Definition imonorder.hpp:43
std::vector< bool > laurentVariables(const MonomialOrder *mo)
Definition imonorder.cpp:16
void monomialOrderDecodeToActualExponents(const MonomialOrder *mo, const_monomial a, exponents_t b)
const int * const_monomial
Definition imonorder.hpp:45
MonomialOrder * monomialOrderMake(const MonomialOrdering *mo)
void monomialOrderFree(MonomialOrder *mo)
void monomialOrderEncodeFromActualExponents(const MonomialOrder *mo, const_exponents a, monomial b)
MonomialOrdering_type
Engine-boundary C API for assembling block-level MonomialOrderings from declarative pieces.
struct mo_block * blocks
Definition imonorder.hpp:86
Internal compiled form of a monomial ordering, derived from a front-end MonomialOrdering by monomialO...
Definition imonorder.hpp:75
Front-end-side description of a monomial ordering as a list of mon_part blocks.
enum MonomialOrdering_type typ
Definition imonorder.hpp:49
int first_exp
Definition imonorder.hpp:52
int first_slot
Definition imonorder.hpp:53
deg_t * weights
Definition imonorder.hpp:55
int nweights
Definition imonorder.hpp:54