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

◆ s_pair_step()

bool gb2_comp::s_pair_step ( )
private

Definition at line 557 of file res-a2-gb.cpp.

562{
563 if (use_hilb && n_gb_syz == 0) flush_pairs();
564 if (these_pairs == nullptr) return false; // Done
565 s_pair *p = these_pairs;
566 these_pairs = these_pairs->next;
567
570
571 gbvector *f = p->f;
572 gbvector *fsyz = p->fsyz;
573 p->f = nullptr;
574 p->fsyz = nullptr;
575 remove_pair(p);
576
577 gb_reduce(f, fsyz);
578 if (f != nullptr)
579 {
580 gb_insert(f, fsyz, 0);
581 n_gb_syz--;
582 n_pairs_gb++;
583 if (M2_gbTrace >= 3) emit_wrapped("m");
584 }
585 else if (fsyz != nullptr && syz != nullptr)
586 {
587 if (syz->receive_generator(fsyz, n_syz++, GR->one()))
588 {
589 n_gb_syz--;
590 n_pairs_syz++;
591 if (M2_gbTrace >= 3) emit_wrapped("z");
592 }
593 else
594 {
595 n_pairs_usyz++;
596 if (M2_gbTrace >= 3) emit_wrapped("u");
597 }
598 }
599 else
600 {
601 if (fsyz != nullptr) GR->gbvector_remove(fsyz);
602 n_pairs_zero++;
603 if (M2_gbTrace >= 3) emit_wrapped("o");
604 }
605 return true;
606}
int n_syz
Definition res-a2.hpp:144
int n_pairs_computed
Definition res-a2.hpp:147
int n_pairs_syz
Definition res-a2.hpp:149
int n_pairs_gb
Definition res-a2.hpp:151
gb_node * syz
Definition res-a2.hpp:137
int n_pairs_zero
Definition res-a2.hpp:152
void gb_insert(gbvector *f, gbvector *fsyz, int ismin)
void remove_pair(s_pair *&p)
Definition res-a2-gb.cpp:90
s_pair * these_pairs
Definition res-a2.hpp:130
int n_pairs_usyz
Definition res-a2.hpp:150
void gb_reduce(gbvector *&f, gbvector *&fsyz)
char use_hilb
Definition res-a2.hpp:164
void flush_pairs()
void compute_s_pair(s_pair *p)
GBRing * GR
Definition res-a2.hpp:114
int n_gb_syz
Definition res-a2.hpp:169
int p
int M2_gbTrace
Definition m2-types.cpp:52
void emit_wrapped(const char *s)
Definition text-io.cpp:27

References compute_s_pair(), emit_wrapped(), flush_pairs(), gb_insert(), gb_reduce(), GR, M2_gbTrace, n_gb_syz, n_pairs_computed, n_pairs_gb, n_pairs_syz, n_pairs_usyz, n_pairs_zero, n_syz, p, remove_pair(), syz, these_pairs, and use_hilb.

Referenced by calc_gb().