Macaulay2 Engine
Loading...
Searching...
No Matches

◆ MonomialInfo()

MonomialInfo::MonomialInfo ( int nvars,
const MonomialOrdering * mo,
const std::vector< int > & heftDegrees,
const std::vector< int > & moduleHeftDegrees )

Definition at line 11 of file moninfo.cpp.

15 : mHeftDegrees(heftDegrees),
16 mModuleHeftDegrees(moduleHeftDegrees)
17{
18 nvars = nvars0;
20 for (int i = 0; i < nvars; i++) hashfcn[i] = rand();
21 mask = 0x10000000;
22
24 ncalls_mult = 0;
32 ncalls_divide = 0;
33 ncalls_weight = 0;
36
38 mWeightVectors, // flattened
39 mTieBreakerIsRevLex, // true means RevLex, false means Lex
40 mPositionUp, // +1 means Up, -1 means Down
41 mComponentLoc); // 0 means check first comp, -1 means check at end, otherwise check before this location
42
43 mNumWeights = (nvars == 0 ? 0 : mWeightVectors.size() / nvars);
44
45 // if (moIsLex(mo))
46 // {
47 // compare = &MonomialInfo::compare_lex;
48
49 // if (M2_gbTrace >= 1) fprintf(stderr, "lex order\n");
50 // }
51 // else if (moIsGRevLex(mo))
52 // {
53 // compare = &MonomialInfo::compare_grevlex;
54
55 // if (M2_gbTrace >= 1) fprintf(stderr, "grevlex order\n");
56 // }
57 // else
58 // {
59 // weight_vectors = moGetWeightValues(mo);
60 // nweights = weight_vectors->len / nvars;
61 // compare = &MonomialInfo::compare_weightvector;
62
63 // if (M2_gbTrace >= 1) fprintf(stderr, "weight order\n");
64 // }
65
66 nslots = 2 + nvars + mNumWeights;
68}
unsigned long ncalls_weight
Definition moninfo.hpp:142
unsigned long ncalls_to_varpower
Definition moninfo.hpp:137
unsigned long ncalls_from_expvector
Definition moninfo.hpp:135
monomial_word mask
Definition moninfo.hpp:112
unsigned long ncalls_is_equal_true
Definition moninfo.hpp:140
unsigned long ncalls_compare
Definition moninfo.hpp:132
unsigned long ncalls_quotient_as_vp
Definition moninfo.hpp:144
unsigned long ncalls_unneccesary
Definition moninfo.hpp:143
std::vector< int > mHeftDegrees
Definition moninfo.hpp:120
std::vector< int > mModuleHeftDegrees
Definition moninfo.hpp:123
unsigned long ncalls_to_expvector
Definition moninfo.hpp:136
std::vector< int > mWeightVectors
Definition moninfo.hpp:119
bool mTieBreakerIsRevLex
Definition moninfo.hpp:125
unsigned long ncalls_get_component
Definition moninfo.hpp:134
unsigned long ncalls_is_equal
Definition moninfo.hpp:139
unsigned long ncalls_divide
Definition moninfo.hpp:141
unsigned long ncalls_from_varpower
Definition moninfo.hpp:138
unsigned long ncalls_mult
Definition moninfo.hpp:133
int mComponentLoc
Definition moninfo.hpp:127
monomial_word * hashfcn
Definition moninfo.hpp:111
bool monomialOrderingToMatrix(const struct MonomialOrdering &mo, std::vector< int > &mat, bool &base_is_revlex, int &component_direction, int &component_is_before_row)
long monomial_word
Definition moninfo.hpp:77

References firstvar, hashfcn, mask, mComponentLoc, mHeftDegrees, mModuleHeftDegrees, mNumWeights, monomialOrderingToMatrix(), mPositionUp, mTieBreakerIsRevLex, mWeightVectors, ncalls_compare, ncalls_divide, ncalls_from_expvector, ncalls_from_varpower, ncalls_get_component, ncalls_is_equal, ncalls_is_equal_true, ncalls_mult, ncalls_quotient_as_vp, ncalls_to_expvector, ncalls_to_varpower, ncalls_unneccesary, ncalls_weight, nslots, and nvars.