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

◆ calc_gb()

enum ComputationStatusCode gb_emitter::calc_gb ( int degree)
virtual

Implements gb_node.

Definition at line 27 of file res-a2.cpp.

28{
29 // This is when we ship off the elements in this degree. This should NEVER
30 // be called if elements of lower degree have not been sent.
31 if (this_degree != degree)
32 {
33 start_degree(degree);
34 }
35 for (;;)
36 {
38 if (n_i >= n_gens) return COMP_DONE;
39 if (g != nullptr)
40 {
41 ring_elem denom;
42 gbvector *v = originalR->translate_gbvector_from_vec(
43 gens->rows(), (*gens)[these[n_i]], denom);
44 g->receive_generator(v, these[n_i], denom);
45 }
46 n_i++;
47 n_left--;
48 }
49}
int n_gens
Definition res-a2.hpp:73
int start_degree(int deg)
Definition res-a2.cpp:55
int n_left
Definition res-a2.hpp:71
const Matrix * gens
Definition res-a2.hpp:68
int * these
Definition res-a2.hpp:74
int this_degree
Definition res-a2.hpp:70
gb_node * g
Definition res-a2.hpp:69
const PolynomialRing * originalR
Definition res-a2.hpp:66
@ COMP_DONE
Definition computation.h:60
@ COMP_INTERRUPTED
Definition computation.h:57
bool system_interrupted()

References COMP_DONE, COMP_INTERRUPTED, g, gens, n_gens, n_i, n_left, originalR, start_degree(), system_interrupted(), these, and this_degree.

Referenced by calc_gens().