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

◆ setup()

void gb2_comp::setup ( FreeModule * Fsyz,
stash * mi_stash,
gb_node * gens,
int lodegree,
int origsyz,
int level,
int strategy )
private

Definition at line 11 of file res-a2-gb.cpp.

18{
19 level = lev;
20 int i;
21 originalR = FFsyz->get_ring()->cast_to_PolynomialRing();
22 if (originalR == nullptr)
23 {
24 ERROR("internal error - ring is not a polynomial ring");
25 assert(0);
26 }
27 GR = originalR->get_gb_ring();
28 M = GR->get_flattened_monoid();
29 K = GR->get_flattened_coefficients();
30
31 mi_stash = mi_stash0;
32
33 F = const_cast<FreeModule *>(ggens->output_free_module());
34
35 gens = ggens;
36 syz = nullptr;
37
38 Fsyz = const_cast<FreeModule *>(FFsyz);
39
40 spairs = new s_pair_heap(M);
41
42 n_gb = n_mingens = n_subring = 0;
43 n_gb_first = 0;
48
49 orig_syz = origsyz; // Note: if orig_syz > 0, then Fsyz is
50 // completely set already.
51
52 this_degree = lodeg;
53
54 // We index into this using gbvector components (which are one greater than
55 // the
56 // FreeModule components
57 monideals.push_back(nullptr);
58 for (i = 0; i < F->rank(); i++)
59 {
60 monideal_pair *p = new monideal_pair(originalR, mi_stash);
61 monideals.push_back(p);
62 }
63
64 use_hilb = 0;
65 hf_numgens_F = F->rank();
66 hf_numgens_gb = 0; // This will enable the initial computation of HF,
67 // if use_hilb is set.
69 n_gb_syz = 0;
70
71 strategy_flags = strategy;
73}
int n_pairs_computed
Definition res-a2.hpp:147
int n_gb_first
Definition res-a2.hpp:126
int n_subring
Definition res-a2.hpp:143
int n_pairs
Definition res-a2.hpp:146
RingElement * hf
Definition res-a2.hpp:165
int n_pairs_syz
Definition res-a2.hpp:149
int n_pairs_gb
Definition res-a2.hpp:151
gb_node * syz
Definition res-a2.hpp:137
int n_pairs_zero
Definition res-a2.hpp:152
FreeModule * Fsyz
Definition res-a2.hpp:121
int level
Definition res-a2.hpp:123
int orig_syz
Definition res-a2.hpp:157
int hf_numgens_F
Definition res-a2.hpp:168
int n_gb
Definition res-a2.hpp:141
stash * mi_stash
Definition res-a2.hpp:118
int this_degree
Definition res-a2.hpp:125
int state
Definition res-a2.hpp:124
int n_mingens
Definition res-a2.hpp:142
const Ring * K
Definition res-a2.hpp:117
int strategy_flags
Definition res-a2.hpp:160
FreeModule * F
Definition res-a2.hpp:120
s_pair_heap * spairs
Definition res-a2.hpp:129
int n_pairs_gcd
Definition res-a2.hpp:154
int n_pairs_usyz
Definition res-a2.hpp:150
const Monoid * M
Definition res-a2.hpp:115
char use_hilb
Definition res-a2.hpp:164
const PolynomialRing * originalR
Definition res-a2.hpp:113
int n_pairs_hilb
Definition res-a2.hpp:153
gb_node * gens
Definition res-a2.hpp:138
int hf_numgens_gb
Definition res-a2.hpp:166
GBRing * GR
Definition res-a2.hpp:114
int n_gb_syz
Definition res-a2.hpp:169
static RingElement * hilbertNumerator(const Matrix *M)
Definition hilb.cpp:665
int p
const int ERROR
Definition m2-mem.cpp:55
#define STATE_GENS
Definition res-a2.hpp:16

References Ring::cast_to_PolynomialRing(), ERROR, F, Fsyz, gens, FreeModule::get_ring(), GR, hf, hf_numgens_F, hf_numgens_gb, hilb_comp::hilbertNumerator(), K, level, M, mi_stash, n_gb, n_gb_first, n_gb_syz, n_mingens, n_pairs, n_pairs_computed, n_pairs_gb, n_pairs_gcd, n_pairs_hilb, n_pairs_syz, n_pairs_usyz, n_pairs_zero, n_subring, orig_syz, originalR, gb_node::output_free_module(), p, spairs, state, STATE_GENS, strategy_flags, syz, this_degree, and use_hilb.

Referenced by gb2_comp().