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

◆ do_pairs_by_degree()

enum ComputationStatusCode res2_comp::do_pairs_by_degree ( int level,
int degree )

Definition at line 214 of file res-a0.cpp.

215{
216 // Find the first pair in this degree, and count the number of
217 // pairs to compute in this degree.
218 // If this number is 0, continue
219 res2_pair *p;
220
221 if (M2_gbTrace >= 2 && level > 1)
222 {
223 p = resn[level]->next_pair;
224 int nelems = 0;
225 while (p != nullptr && p->degree == degree)
226 {
227 nelems++;
228 p = p->next;
229 }
230 if (nelems > 0)
231 {
232 buffer o;
233 o << '[' << nelems << ']';
234 emit(o.str());
235 }
236 }
237 for (p = resn[level]->next_pair; p != nullptr; p = p->next)
238 {
239 if (p->degree != degree) break;
240 resn[level]->next_pair = p->next;
241 if (p->syz_type == SYZ2_S_PAIR || p->syz_type == SYZ2_NOT_NEEDED ||
242 (p->syz_type == SYZ2_MAYBE_MINIMAL && level < length_limit + 1))
243 {
245 if (stop_.pair_limit > 0 && npairs - nleft >= stop_.pair_limit)
247 // if (--PairLimit == 0) return COMP_DONE_PAIR_LIMIT;
248 if (stop_.syzygy_limit > 0 && nminimal >= stop_.syzygy_limit)
250 }
252 }
253 return COMP_COMPUTING;
254}
StopConditions stop_
Definition comp.hpp:75
char * str()
Definition buffer.hpp:72
int length_limit
Definition res-a0.hpp:147
int nminimal
Definition res-a0.hpp:183
int npairs
Definition res-a0.hpp:182
int nleft
Definition res-a0.hpp:181
void handle_pair_by_degree(res2_pair *p)
Definition res-a0.cpp:1767
@ COMP_DONE_PAIR_LIMIT
Definition computation.h:64
@ COMP_DONE_SYZYGY_LIMIT
Definition computation.h:63
@ COMP_COMPUTING
Definition computation.h:71
@ COMP_INTERRUPTED
Definition computation.h:57
int p
bool system_interrupted()
int M2_gbTrace
Definition m2-types.cpp:52
@ SYZ2_MAYBE_MINIMAL
@ SYZ2_NOT_NEEDED
@ SYZ2_S_PAIR
void emit(const char *s)
Definition text-io.cpp:41

References COMP_COMPUTING, COMP_DONE_PAIR_LIMIT, COMP_DONE_SYZYGY_LIMIT, COMP_INTERRUPTED, emit(), handle_pair_by_degree(), length_limit, M2_gbTrace, nleft, nminimal, npairs, p, Computation::stop_, buffer::str(), system_interrupted(), SYZ2_MAYBE_MINIMAL, SYZ2_NOT_NEEDED, and SYZ2_S_PAIR.

Referenced by start_computation().