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

◆ handle_pair_by_degree()

void res2_comp::handle_pair_by_degree ( res2_pair * p)
private

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

1768{
1769 nleft--;
1770 resn[p->level]->nleft--;
1771
1772 // For level 1: any non-marked GB elements in this degree are
1773 // minimal generators, so we need to mark them as such
1774 if (p->level == 1)
1775 {
1776 if (p->syz_type != SYZ2_NOT_NEEDED)
1777 {
1778 p->syz_type = SYZ2_MINIMAL;
1779 if (M2_gbTrace >= 2) emit_wrapped("z");
1780 nminimal++;
1781 }
1782 return;
1783 }
1784
1785 res2term *f = s_pair(p->syz);
1786 res2_pair *q = reduce4(f, p->syz, p->pivot_term, p);
1787 // In this version of 'reduce', the resulting value of 'f' is irrelevant.
1788 // And in fact the routine should probably read:
1789 // res2_pair *q = reduce4(p->syz, p->pivot_term);
1790 if (q == nullptr)
1791 {
1792 if (p->syz_type != SYZ2_NOT_NEEDED)
1793 {
1794 // minimal syzygy
1795 p->syz_type = SYZ2_MINIMAL;
1796 nminimal++;
1797 resn[p->level]->nminimal++;
1798 if (M2_gbTrace >= 2) emit_wrapped("z");
1799 }
1800 else
1801 {
1802 if (M2_gbTrace >= 2) emit_wrapped("o");
1803 }
1804 }
1805 else
1806 {
1807 p->syz_type = SYZ2_NOT_MINIMAL;
1809 if (M2_gbTrace >= 2) emit_wrapped("m");
1810 }
1811}
res2term * s_pair(res2term *fsyz) const
Definition res-a0.cpp:1110
res2_pair * reduce4(res2term *&f, res2term *&fsyz, res2term *&pivot, res2_pair *p)
Definition res-a0.cpp:1402
int nminimal
Definition res-a0.hpp:183
int nleft
Definition res-a0.hpp:181
int p
int M2_gbTrace
Definition m2-types.cpp:52
@ SYZ2_NOT_NEEDED
@ SYZ2_NOT_MINIMAL
@ SYZ2_MINIMAL
unsigned char syz_type
void emit_wrapped(const char *s)
Definition text-io.cpp:27

References emit_wrapped(), M2_gbTrace, nleft, nminimal, p, reduce4(), s_pair(), SYZ2_MINIMAL, SYZ2_NOT_MINIMAL, SYZ2_NOT_NEEDED, and res2_pair::syz_type.

Referenced by do_pairs_by_degree().