Changeset de1dd6 in git
- Timestamp:
- Jun 23, 2008, 10:45:22 AM (15 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 71b676cf8066b02d4bca22a6df4ddfd986256046
- Parents:
- f1b9c57f647835474f1c1a7163a27646f2de70b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/sca.cc
rf1b9c57 rde1dd6 7 7 * Author: motsak (Oleksandr Motsak) 8 8 * Created: 2006/12/18 9 * Version: $Id: sca.cc,v 1.2 0 2008-06-21 11:34:31Singular Exp $9 * Version: $Id: sca.cc,v 1.21 2008-06-23 08:45:22 Singular Exp $ 10 10 *******************************************************************/ 11 11 … … 1114 1114 1115 1115 { 1116 const poly p Next = pNext(save);1117 1118 if( p Next != NULL )1116 const poly p_next = pNext(save); 1117 1118 if( p_next != NULL ) 1119 1119 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ ) 1120 1120 if( p_GetExp(save, i, currRing) != 0 ) … … 1122 1122 assume(p_GetExp(save, i, currRing) == 1); 1123 1123 1124 const poly tt = sca_pp_Mult_xi_pp(i, p Next, currRing);1124 const poly tt = sca_pp_Mult_xi_pp(i, p_next, currRing); 1125 1125 1126 1126 #ifdef PDEBUG … … 1762 1762 // SCA: 1763 1763 const poly pSave = strat->P.p; 1764 const poly p Next = pNext(pSave);1764 const poly p_next = pNext(pSave); 1765 1765 1766 1766 // if(0) 1767 if( p_next != NULL ) 1767 1768 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ ) 1768 1769 if( p_GetExp(pSave, i, currRing) != 0 ) 1769 1770 { 1770 1771 assume(p_GetExp(pSave, i, currRing) == 1); 1771 if (pNext!=NULL) 1772 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing); 1773 1774 #ifdef PDEBUG 1775 p_Test(p_new, currRing); 1776 #endif 1777 1778 if( p_new == NULL) continue; 1779 1780 LObject h(p_new); // h = x_i * strat->P 1781 1782 if (TEST_OPT_INTSTRATEGY) 1772 1783 { 1773 const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing); 1774 1775 #ifdef PDEBUG 1776 p_Test(pNew, currRing); 1777 #endif 1778 1779 if( pNew == NULL) continue; 1780 1781 LObject h(pNew); // h = x_i * strat->P 1782 1783 if (TEST_OPT_INTSTRATEGY) 1784 // h.pCleardenom(); // also does a pContent 1785 pContent(h.p); 1786 } 1787 else 1788 { 1789 h.pNorm(); 1790 } 1791 1792 strat->initEcart(&h); 1793 h.sev = pGetShortExpVector(h.p); 1794 1795 int pos; 1796 if (strat->Ll==-1) 1797 pos =0; 1798 else 1799 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1800 1801 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos); 1802 /* 1803 h.sev = pGetShortExpVector(h.p); 1804 strat->initEcart(&h); 1805 1806 h.PrepareRed(strat->use_buckets); 1807 1808 // reduction of the element choosen from L(?) 1809 red_result = strat->red(&h,strat); 1810 1811 // reduction to non-zero new poly 1812 if (red_result != 1) continue; 1813 1814 1815 int pos = posInS(strat,strat->sl,h.p,h.ecart); 1816 1817 // reduce the tail and normalize poly 1818 if (TEST_OPT_INTSTRATEGY) 1819 { 1820 h.pCleardenom(); 1821 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1784 1822 { 1785 // h.pCleardenom(); // also does a pContent 1786 pContent(h.p);1823 h.p = redtailBba(&(h),pos-1,strat, withT); // !!! 1824 h.pCleardenom(); 1787 1825 } 1788 else 1789 { 1790 h.pNorm(); 1791 } 1792 1793 strat->initEcart(&h); 1794 h.sev = pGetShortExpVector(h.p); 1795 1796 int pos; 1797 if (strat->Ll==-1) 1798 pos =0; 1799 else 1800 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1801 1802 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos); 1803 /* 1804 h.sev = pGetShortExpVector(h.p); 1805 strat->initEcart(&h); 1806 1807 h.PrepareRed(strat->use_buckets); 1808 1809 // reduction of the element choosen from L(?) 1810 red_result = strat->red(&h,strat); 1811 1812 // reduction to non-zero new poly 1813 if (red_result != 1) continue; 1814 1815 1816 int pos = posInS(strat,strat->sl,h.p,h.ecart); 1817 1818 // reduce the tail and normalize poly 1819 if (TEST_OPT_INTSTRATEGY) 1820 { 1821 h.pCleardenom(); 1822 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1823 { 1824 h.p = redtailBba(&(h),pos-1,strat, withT); // !!! 1825 h.pCleardenom(); 1826 } 1827 } 1828 else 1829 { 1830 h.pNorm(); 1831 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1832 h.p = redtailBba(&(h),pos-1,strat, withT); 1833 } 1826 } 1827 else 1828 { 1829 h.pNorm(); 1830 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 1831 h.p = redtailBba(&(h),pos-1,strat, withT); 1832 } 1834 1833 1835 1834 #ifdef KDEBUG 1836 if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();} 1837 #endif 1838 1839 // h.PrepareRed(strat->use_buckets); // ??? 1840 1841 h.sev = pGetShortExpVector(h.p); 1842 strat->initEcart(&h); 1843 1844 if (strat->Ll==-1) 1845 pos = 0; 1846 else 1847 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1848 1849 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/ 1850 1851 } 1835 if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();} 1836 #endif 1837 1838 // h.PrepareRed(strat->use_buckets); // ??? 1839 1840 h.sev = pGetShortExpVector(h.p); 1841 strat->initEcart(&h); 1842 1843 if (strat->Ll==-1) 1844 pos = 0; 1845 else 1846 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 1847 1848 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/ 1849 1852 1850 } // for all x_i \in Ann(lm(P)) 1853 1851 } // if red(P) != NULL … … 2128 2126 // SCA: 2129 2127 const poly pSave = strat->P.p; 2130 const poly p Next = pNext(pSave);2131 2132 if(p Next != NULL)2128 const poly p_next = pNext(pSave); 2129 2130 if(p_next != NULL) 2133 2131 for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ ) 2134 2132 if( p_GetExp(pSave, i, currRing) != 0 ) … … 2137 2135 assume(p_GetExp(pSave, i, currRing) == 1); 2138 2136 2139 const poly p New = sca_pp_Mult_xi_pp(i, pNext, currRing);2140 2141 #ifdef PDEBUG 2142 p_Test(p New, currRing);2143 #endif 2144 2145 if( p New == NULL) continue;2146 2147 LObject h(p New); // h = x_i * strat->P2137 const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing); 2138 2139 #ifdef PDEBUG 2140 p_Test(p_new, currRing); 2141 #endif 2142 2143 if( p_new == NULL) continue; 2144 2145 LObject h(p_new); // h = x_i * strat->P 2148 2146 2149 2147 if (TEST_OPT_INTSTRATEGY)
Note: See TracChangeset
for help on using the changeset viewer.