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

◆ process_spair()

bool gbA::process_spair ( spair * p)
private

Definition at line 2311 of file gb-default.cpp.

2312{
2313 stats_npairs++;
2314 if (false and spair_is_retired(p))
2315 {
2317 spair_delete(p);
2318 return true;
2319 }
2320
2321 bool not_deferred = reduceit(p);
2322 if (!not_deferred) return true;
2323
2324 gbelem_type minlevel =
2325 (p->type == SPAIR::SPAIR_GEN ? ELEM_MINGEN : 0) | ELEM_MINGB;
2326
2327 POLY f = p->x.f;
2328 p->x.f.f = nullptr;
2329 p->x.f.fsyz = nullptr;
2330 spair_delete(p);
2331
2332 if (!R->gbvector_is_zero(f.f))
2333 {
2334 insert_gb(f, minlevel);
2335 if (M2_gbTrace == 3) emit_wrapped("m");
2336 }
2337 else
2338 {
2339 originalR->get_quotient_info()->gbvector_normal_form(_Fsyz, f.fsyz);
2340 if (!R->gbvector_is_zero(f.fsyz))
2341 {
2342 /* This is a syzygy */
2344 if (M2_gbTrace == 3) emit_wrapped("z");
2345 }
2346 else
2347 {
2348 if (M2_gbTrace == 3) emit_wrapped("o");
2349 }
2350 }
2351 return true;
2352}
void spair_delete(spair *&p)
GBRing * R
const PolynomialRing * originalR
bool reduceit(spair *p)
int stats_nretired
bool spair_is_retired(spair *p) const
int stats_npairs
const FreeModule * _Fsyz
void insert_gb(POLY f, gbelem_type minlevel)
@ SPAIR_GEN
int gbelem_type
void collect_syzygy(gbvector *fsyz)
const int ELEM_MINGB
const int ELEM_MINGEN
int p
int M2_gbTrace
Definition m2-types.cpp:52
#define POLY(q)
Definition poly.cpp:23
gbvector * fsyz
Definition gbring.hpp:99
gbvector * f
Definition gbring.hpp:98
void emit_wrapped(const char *s)
Definition text-io.cpp:27

References _Fsyz, collect_syzygy(), ELEM_MINGB, ELEM_MINGEN, emit_wrapped(), POLY::f, POLY::fsyz, insert_gb(), M2_gbTrace, originalR, p, POLY, R, reduceit(), spair_delete(), SPAIR_GEN, spair_is_retired(), stats_npairs, and stats_nretired.

Referenced by do_computation().