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

◆ start_computation()

void gbres_comp::start_computation ( )
virtual

Implements ResolutionComputation.

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

192{
193 // int old_compare_type = compare_type;
194 // compare_type = (strategy_flags >> 10);
195 // if (M2_gbTrace >= 4)
196 // {
197 // buffer o;
198 // o << "compare=" << compare_type << newline;
199 // emit(o.str());
200 // }
201 for (int i = lo_degree; !is_done(); i++)
202 {
203 if (stop_.stop_after_degree && stop_.degree_limit->array[0] < i)
204 {
206 // compare_type = old_compare_type;
207 return;
208 }
209 if (M2_gbTrace >= 1)
210 {
211 buffer o;
212 o << "{" << i << "}";
213 emit(o.str());
214 }
215 enum ComputationStatusCode ret =
216 nodes[n_nodes - 1]->calc_gens(i + n_nodes - 3);
217 if (ret != COMP_DONE)
218 {
219 set_status(ret);
220 // compare_type = old_compare_type;
221 return;
222 }
224 }
225 // compare_type = old_compare_type;
227}
enum ComputationStatusCode set_status(enum ComputationStatusCode)
Definition comp.cpp:66
StopConditions stop_
Definition comp.hpp:75
char * str()
Definition buffer.hpp:72
int n_nodes
Definition res-a2.hpp:253
int lo_degree
Definition res-a2.hpp:256
gb_node ** nodes
Definition res-a2.hpp:254
bool is_done()
Definition res-a2.cpp:229
int last_completed_degree
Definition res-a2.hpp:257
ComputationStatusCode
Definition computation.h:53
@ COMP_DONE
Definition computation.h:60
@ COMP_DONE_DEGREE_LIMIT
Definition computation.h:61
int M2_gbTrace
Definition m2-types.cpp:52
void emit(const char *s)
Definition text-io.cpp:41

References COMP_DONE, COMP_DONE_DEGREE_LIMIT, emit(), is_done(), last_completed_degree, lo_degree, M2_gbTrace, n_nodes, nodes, Computation::set_status(), Computation::stop_, and buffer::str().