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

◆ set_up0()

void GBinhom_comp::set_up0 ( const Matrix * m,
int csyz,
int nsyz,
M2_arrayint gb_weights )
private

Definition at line 19 of file gb-sugarless.cpp.

23{
24 int i;
25 const PolynomialRing *R = m->get_ring()->cast_to_PolynomialRing();
26 if (R == nullptr)
27 {
28 ERROR("ring is not a polynomial ring");
29 // MES: throw an error here.
30 assert(0);
31 }
32 originalR = R;
33 GR = R->get_gb_ring();
34 weightInfo_ = new GBWeight(m->rows(), gb_weights);
35 M = GR->get_flattened_monoid();
36 K = GR->get_flattened_coefficients();
37
38 spairs = new s_pair_heap(M);
39
40 gb = gbLarge = new gb_elem; // List head for the GB computed so far
41 gb->next = nullptr; // (both minimal, and large GB's)
42 gb->next_min = nullptr;
43
44 if (nsyz < 0 || nsyz > m->n_cols()) nsyz = m->n_cols();
45 n_comps_per_syz = nsyz;
46
47 F = m->rows();
48
49 n_gb = n_subring = 0;
50 n_pairs = n_computed = 0;
51 last_gb_num = 0;
53
54 collect_syz = csyz;
55 is_ideal = (F->rank() == 1 && csyz == 0);
56 if (GR->is_weyl_algebra()) is_ideal = false;
57 need_resize = 0;
58
59 for (i = 0; i < F->rank(); i++) monideals.push_back(new MonomialIdeal(R));
60}
const Ring * K
gb_elem * gbLarge
const FreeModule * F
s_pair_heap * spairs
GBWeight * weightInfo_
const Monoid * M
const PolynomialRing * originalR
const Ring * get_ring() const
Definition matrix.hpp:134
int n_cols() const
Definition matrix.hpp:147
const FreeModule * rows() const
Definition matrix.hpp:144
virtual GBRing * get_gb_ring() const
Definition polyring.hpp:276
virtual const PolynomialRing * cast_to_PolynomialRing() const
Definition ring.hpp:243
const int ERROR
Definition m2-mem.cpp:55

References Ring::cast_to_PolynomialRing(), collect_syz, ERROR, F, gb, gbLarge, PolynomialRing::get_gb_ring(), Matrix::get_ring(), GR, is_ideal, K, last_gb_num, M, Matrix, Matrix::n_cols(), n_comps_per_syz, n_computed, n_gb, n_pairs, n_saved_gcd, n_saved_lcm, n_subring, need_resize, originalR, Matrix::rows(), spairs, and weightInfo_.

Referenced by set_up().