Changeset de1dd6 in git for kernel


Ignore:
Timestamp:
Jun 23, 2008, 10:45:22 AM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
71b676cf8066b02d4bca22a6df4ddfd986256046
Parents:
f1b9c57f647835474f1c1a7163a27646f2de70b7
Message:
*hannes: fixed notations


git-svn-id: file:///usr/local/Singular/svn/trunk@10774 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/sca.cc

    rf1b9c57 rde1dd6  
    77 *  Author:  motsak (Oleksandr Motsak)
    88 *  Created: 2006/12/18
    9  *  Version: $Id: sca.cc,v 1.20 2008-06-21 11:34:31 Singular Exp $
     9 *  Version: $Id: sca.cc,v 1.21 2008-06-23 08:45:22 Singular Exp $
    1010 *******************************************************************/
    1111
     
    11141114
    11151115    {
    1116       const poly pNext = pNext(save);
    1117 
    1118       if( pNext != NULL )
     1116      const poly p_next = pNext(save);
     1117
     1118      if( p_next != NULL )
    11191119      for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
    11201120      if( p_GetExp(save, i, currRing) != 0 )
     
    11221122        assume(p_GetExp(save, i, currRing) == 1);
    11231123
    1124         const poly tt = sca_pp_Mult_xi_pp(i, pNext, currRing);
     1124        const poly tt = sca_pp_Mult_xi_pp(i, p_next, currRing);
    11251125
    11261126#ifdef PDEBUG
     
    17621762      // SCA:
    17631763      const poly pSave = strat->P.p;
    1764       const poly pNext = pNext(pSave);
     1764      const poly p_next = pNext(pSave);
    17651765
    17661766//       if(0)
     1767      if( p_next != NULL )
    17671768      for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
    17681769      if( p_GetExp(pSave, i, currRing) != 0 )
    17691770      {
    17701771        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)
    17721783        {
    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))
    17841822          {
    1785 //            h.pCleardenom(); // also does a pContent
    1786             pContent(h.p);
     1823            h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
     1824            h.pCleardenom();
    17871825          }
    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        }
    18341833
    18351834#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
    18521850      } // for all x_i \in Ann(lm(P))
    18531851    } // if red(P) != NULL
     
    21282126      // SCA:
    21292127      const poly pSave = strat->P.p;
    2130       const poly pNext = pNext(pSave);
    2131 
    2132       if(pNext != NULL)
     2128      const poly p_next = pNext(pSave);
     2129
     2130      if(p_next != NULL)
    21332131      for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
    21342132      if( p_GetExp(pSave, i, currRing) != 0 )
     
    21372135        assume(p_GetExp(pSave, i, currRing) == 1);
    21382136
    2139         const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing);
    2140 
    2141 #ifdef PDEBUG
    2142         p_Test(pNew, currRing);
    2143 #endif
    2144 
    2145         if( pNew == NULL) continue;
    2146 
    2147         LObject h(pNew); // h = x_i * strat->P
     2137        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
    21482146
    21492147        if (TEST_OPT_INTSTRATEGY)
Note: See TracChangeset for help on using the changeset viewer.