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

◆ spair_text_out()

void gbA::spair_text_out ( buffer & o,
spair * p )
private

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

522{
523 const int N = 1000;
524 char s[N]; // enough room for all of the non polynomial cases.
525 switch (p->type)
526 {
528 snprintf(s, N, "spairgcd(g%d,g%d)", p->x.pair.j, p->x.pair.i);
529 o << s;
530 snprintf(s, N, " deg(%d)", p->deg);
531 o << s;
532 o << " lcm[";
533 for (int i = 0; i < _nvars + 2; i++)
534 {
535 snprintf(s, N, "%d ", p->lcm[i]);
536 o << s;
537 }
538 o << "]";
539 break;
541 snprintf(s, N, "spair(g%d,g%d):", p->x.pair.j, p->x.pair.i);
542 o << s;
543 snprintf(s, N, " deg %d", p->deg);
544 o << s;
545 o << " lcm exponents [";
546 for (int i = 0; i < _nvars + 2; i++)
547 {
548 snprintf(s, N, "%d ", p->lcm[i]);
549 o << s;
550 }
551 o << "]";
552 break;
553 case SPAIR::SPAIR_GEN:
554 o << "generator ";
555 R->gbvector_text_out(o, _F, p->f(), 3);
556 break;
558 o << "elem ";
559 R->gbvector_text_out(o, _F, p->f(), 3);
560 break;
562 snprintf(s, N, "rpair(%d,%d)", p->x.pair.i, p->x.pair.j);
563 o << s;
564 break;
566 snprintf(s, N, "skewpair(g%d,g%d)", p->x.pair.j, p->x.pair.i);
567 o << s;
568 break;
569 default:
570 o << "unknown pair";
571 break;
572 }
573}
GBRing * R
int _nvars
const FreeModule * _F
@ SPAIR_SPAIR
@ SPAIR_GCD_ZZ
@ SPAIR_RING
@ SPAIR_GEN
@ SPAIR_SKEW
@ SPAIR_ELEM
int p
void size_t s
Definition m2-mem.cpp:271

References _F, _nvars, p, R, s, SPAIR_ELEM, SPAIR_GCD_ZZ, SPAIR_GEN, SPAIR_RING, SPAIR_SKEW, and SPAIR_SPAIR.

Referenced by compute_s_pair(), debug_spair(), minimalize_pairs_non_ZZ(), minimalize_pairs_ZZ(), reduce_kk(), reduce_ZZ(), and remove_unneeded_pairs().