MCPcopy Create free account
hub / github.com/Singular/Singular / enterOneStrongPolySig

Function enterOneStrongPolySig

kernel/GBEngine/kutil.cc:1751–1938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1749}
1750
1751static BOOLEAN enterOneStrongPolySig (int i,poly p,poly sig,int /*ecart*/, int /*isFromQ*/,kStrategy strat, int atR)
1752{
1753 number d, s, t;
1754 assume(atR >= 0);
1755 poly m1, m2, gcd,si;
1756 assume(i<=strat->sl);
1757 si = strat->S[i];
1758 //printf("\n--------------------------------\n");
1759 //pWrite(p);pWrite(si);
1760 d = n_ExtGcd(pGetCoeff(p), pGetCoeff(si), &s, &t, currRing->cf);
1761
1762 if (nIsZero(s) || nIsZero(t)) // evtl. durch divBy tests ersetzen
1763 {
1764 nDelete(&d);
1765 nDelete(&s);
1766 nDelete(&t);
1767 return FALSE;
1768 }
1769
1770 k_GetStrongLeadTerms(p, si, currRing, m1, m2, gcd, strat->tailRing);
1771 //p_Test(m1,strat->tailRing);
1772 //p_Test(m2,strat->tailRing);
1773 /*if(!enterTstrong)
1774 {
1775 while (! kCheckStrongCreation(atR, m1, i, m2, strat) )
1776 {
1777 memset(&(strat->P), 0, sizeof(strat->P));
1778 kStratChangeTailRing(strat);
1779 strat->P = *(strat->R[atR]);
1780 p_LmFree(m1, strat->tailRing);
1781 p_LmFree(m2, strat->tailRing);
1782 p_LmFree(gcd, currRing);
1783 k_GetStrongLeadTerms(p, si, currRing, m1, m2, gcd, strat->tailRing);
1784 }
1785 }*/
1786 pSetCoeff0(m1, s);
1787 pSetCoeff0(m2, t);
1788 pSetCoeff0(gcd, d);
1789 p_Test(m1,strat->tailRing);
1790 p_Test(m2,strat->tailRing);
1791 //printf("\n===================================\n");
1792 //pWrite(m1);pWrite(m2);pWrite(gcd);
1793#ifdef KDEBUG
1794 if (TEST_OPT_DEBUG)
1795 {
1796 // Print("t = %d; s = %d; d = %d\n", nInt(t), nInt(s), nInt(d));
1797 PrintS("m1 = ");
1798 p_wrp(m1, strat->tailRing);
1799 PrintS(" ; m2 = ");
1800 p_wrp(m2, strat->tailRing);
1801 PrintS(" ; gcd = ");
1802 wrp(gcd);
1803 PrintS("\n--- create strong gcd poly: ");
1804 Print("\n p: %d", i);
1805 wrp(p);
1806 Print("\n strat->S[%d]: ", i);
1807 wrp(si);
1808 PrintS(" ---> ");

Callers 1

initenterstrongPairsSigFunction · 0.85

Calls 15

n_ExtGcdFunction · 0.85
k_GetStrongLeadTermsFunction · 0.85
PrintSFunction · 0.85
wrpFunction · 0.85
p_Add_qFunction · 0.85
pp_Mult_mmFunction · 0.85
p_CopyFunction · 0.85
p_Mult_mmFunction · 0.85
p_LmDeleteFunction · 0.85
redRingFunction · 0.85
p_DeleteFunction · 0.85

Tested by

no test coverage detected