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

◆ ResMonoidDense()

ResMonoidDense::ResMonoidDense ( int nvars,
const std::vector< int > & var_degrees,
const std::vector< int > & weightvecs,
MonomialOrderingType moType )

Definition at line 9 of file res-moninfo-dense.cpp.

13{
14 (void) weightvecs;
15 (void) moType;
16 nvars = nvars0;
17 hashfcn = std::unique_ptr<res_monomial_word[]>(new res_monomial_word[nvars]);
18 for (int i = 0; i < nvars; i++) hashfcn[i] = rand();
19 mask = 0x10000000;
20 mVarDegrees = var_degrees;
21
24 ncalls_mult = 0;
32 ncalls_divide = 0;
33 ncalls_weight = 0;
36
37 nweights = 0;
38#if 0
39 if (moType == MonomialOrderingType::Lex) // moIsLex(mo)
40 {
41 compare = &ResMonoidDense::compare_lex;
42
43 if (M2_gbTrace >= 1)
44 fprintf(stderr, "lex order\n");
45 }
46 else if (moType == MonomialOrderingType::GRevLex) // moIsGRevLex(mo)
47 {
48 compare = &ResMonoidDense::compare_grevlex;
49
50 if (M2_gbTrace >= 1)
51 fprintf(stderr, "grevlex order\n");
52 }
53 else
54 {
55 weight_vectors = weightvecs;
56 nweights = static_cast<int>(weight_vectors.size()) / nvars;
57 compare = &ResMonoidDense::compare_weightvector;
58
59 if (M2_gbTrace >= 1)
60 fprintf(stderr, "weight order\n");
61 }
62#endif
63
64 nslots = 2 + nvars + nweights;
65 firstvar = 2 + nweights;
66}
unsigned long ncalls_quotient_as_vp
unsigned long ncalls_hash_value
unsigned long ncalls_to_varpower
unsigned long ncalls_divide
std::unique_ptr< res_monomial_word[]> hashfcn
res_monomial_word mask
unsigned long ncalls_compare
unsigned long ncalls_is_equal
unsigned long ncalls_unneccesary
unsigned long ncalls_to_expvector
unsigned long ncalls_from_expvector
unsigned long ncalls_get_component
unsigned long ncalls_weight
std::vector< int > weight_vectors
std::vector< int > mVarDegrees
unsigned long ncalls_is_equal_true
unsigned long ncalls_mult
unsigned long ncalls_from_varpower
static int compare(const vecterm *t, const vecterm *s)
Definition geovec.hpp:112
int M2_gbTrace
Definition m2-types.cpp:52
myword res_monomial_word

References compare(), firstvar, GRevLex, hashfcn, Lex, M2_gbTrace, mask, mVarDegrees, ncalls_compare, ncalls_divide, ncalls_from_expvector, ncalls_from_varpower, ncalls_get_component, ncalls_hash_value, ncalls_is_equal, ncalls_is_equal_true, ncalls_mult, ncalls_quotient_as_vp, ncalls_to_expvector, ncalls_to_varpower, ncalls_unneccesary, ncalls_weight, nslots, nvars, nweights, and weight_vectors.