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

◆ start_computation()

void GBWalker::start_computation ( )
virtual

Implements GBComputation.

Definition at line 161 of file gb-walk.cpp.

162{
163 if (stop_.always_stop) return; // don't change status
164
165 for (;;) switch (state)
166 {
167 case STATE_compute_w:
168 if (!compute_next_w())
169 {
170 // We are done!
173 return;
174 }
175 inwwG = G->get_parallel_lead_terms(ww);
178 case STATE_do_gb:
179 // Now compute the GB object. If not interrupted, go on:
180 gb_inwwG->start_computation();
181 if (gb_inwwG->status() == COMP_INTERRUPTED)
182 {
184 return;
185 }
186 next_to_reduce = 0;
188 [[fallthrough]];
189 case STATE_reduce:
190 while (next_to_reduce < 0) // TODO: consider the top of the loop
191 {
192 H = G->matrix_remainder(
193 gb_inwwG->get_gb()); // Not quite: need to subtract...
195 }
197 break;
198 case STATE_autoreduce:
199 G->remove_gb();
200 delete G;
201 G1 = static_cast<MarkedGB *>(
202 GBDeclared::create(gb_inwwG->get_initial(-1), H, H, nullptr, nullptr));
204 case STATE_done:
206 return;
207 }
208}
enum ComputationStatusCode set_status(enum ComputationStatusCode)
Definition comp.cpp:66
StopConditions stop_
Definition comp.hpp:75
static GBComputation * create(const Matrix *m, const Matrix *gb, const Matrix *change, const Matrix *syz)
GBComputation * make_gb(const Matrix *M) const
Definition gb-walk.cpp:102
MarkedGB * G1
Definition gb-walk.hpp:89
int next_to_reduce
Definition gb-walk.hpp:85
GBComputation * gb_inwwG
Definition gb-walk.hpp:84
MarkedGB * G
Definition gb-walk.hpp:61
const Matrix * H
Definition gb-walk.hpp:86
enum GBWalker::@204216357340354175217111063216361047022355062066 state
M2_arrayint ww
Definition gb-walk.hpp:82
bool compute_next_w()
Definition gb-walk.cpp:143
@ STATE_reduce
Definition gb-walk.hpp:78
@ STATE_do_gb
Definition gb-walk.hpp:77
@ STATE_compute_w
Definition gb-walk.hpp:76
@ STATE_autoreduce
Definition gb-walk.hpp:79
@ STATE_done
Definition gb-walk.hpp:80
const Matrix * inwwG
Definition gb-walk.hpp:83
@ COMP_DONE
Definition computation.h:60
@ COMP_INTERRUPTED
Definition computation.h:57

References COMP_DONE, COMP_INTERRUPTED, compute_next_w(), GBDeclared::create(), G, G1, gb_inwwG, H, inwwG, make_gb(), next_to_reduce, Computation::set_status(), state, STATE_autoreduce, STATE_compute_w, STATE_do_gb, STATE_done, STATE_reduce, Computation::stop_, and ww.