Changeset b1a5c1 in git for kernel/sca.cc


Ignore:
Timestamp:
Jun 20, 2008, 6:54:45 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
f1b9c57f647835474f1c1a7163a27646f2de70b7
Parents:
8049adb6c137bedd3c5725cd5d503326db71e40c
Message:
*hannes: some fixes for mres (sheafcoh_s.tst)


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

Legend:

Unmodified
Added
Removed
  • kernel/sca.cc

    r8049ad rb1a5c1  
    77 *  Author:  motsak (Oleksandr Motsak)
    88 *  Created: 2006/12/18
    9  *  Version: $Id: sca.cc,v 1.18 2008-06-20 12:28:17 Singular Exp $
     9 *  Version: $Id: sca.cc,v 1.19 2008-06-20 16:54:45 Singular Exp $
    1010 *******************************************************************/
    1111
     
    388388      if(iComponentMonomM==0 )
    389389      {
    390         WarnS("sca_p_Mult_mm: Multiplication in the left module from the right");
     390        dReportError("sca_p_Mult_mm: Multiplication in the left module from the right");
    391391      }
    392392#endif
     
    470470      if(iComponentMonomM==0 )
    471471      {
    472         WarnS("sca_pp_Mult_mm: Multiplication in the left module from the right");
     472        dReportError("sca_pp_Mult_mm: Multiplication in the left module from the right");
    473473      }
    474474#endif
     
    580580      if(iComponent==0 )
    581581      {
    582         WarnS("sca_mm_Mult_pp: Multiplication in the left module from the right!");
     582        dReportError("sca_mm_Mult_pp: Multiplication in the left module from the right!");
    583583//        PrintS("mm = "); p_Write(pMonom, rRing);
    584584//        PrintS("pp = "); p_Write(pPoly, rRing);
    585 //        assume(iComponent!=0);       
     585//        assume(iComponent!=0);
    586586      }
    587587#endif
     
    644644    if( iComponentMonomM!=0 )
    645645    {
    646       if( iComponent!=0 ) 
     646      if( iComponent!=0 )
    647647      {
    648648        // REPORT_ERROR
     
    656656      if(iComponent==0)
    657657      {
    658         WarnS("sca_mm_Mult_p: Multiplication in the left module from the right!");
     658        dReportError("sca_mm_Mult_p: Multiplication in the left module from the right!");
    659659//        PrintS("mm = "); p_Write(pMonom, rRing);
    660660//        PrintS("p = "); p_Write(pPoly, rRing);
    661 //        assume(iComponent!=0);       
     661//        assume(iComponent!=0);
    662662      }
    663663#endif
     
    725725  {
    726726#ifdef PDEBUG
    727     Print("sca_SPoly: different non-zero components!\n");
     727    dReportError("sca_SPoly: different non-zero components!\n");
    728728#endif
    729729    return(NULL);
     
    815815  {
    816816#ifdef PDEBUG
    817     Print("sca_ReduceSpoly: different non-zero components!");
     817    dReportError("sca_ReduceSpoly: different non-zero components!");
    818818#endif
    819819    return(NULL);
     
    921921    }
    922922
     923#ifdef KDEBUG
    923924    if (TEST_OPT_DEBUG)
    924925    {
     
    927928      PrintLn();
    928929    }
     930#endif
    929931
    930932    enterpairs(h.p, strat->sl, h.ecart, 0, strat);
     
    978980
    979981  PrintS("F: \n");
    980   idPrint(F); 
    981   PrintS("Q: \n"); 
     982  idPrint(F);
     983  PrintS("Q: \n");
    982984  idPrint(Q);
    983985#endif
    984986#endif
    985987
    986  
     988
    987989  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
    988990  const unsigned int m_iLastAltVar  = scaLastAltVar(currRing);
     
    10441046    if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/
    10451047
     1048#ifdef KDEBUG
    10461049    if (TEST_OPT_DEBUG) messageSets(strat);
     1050#endif
    10471051
    10481052    if (strat->Ll== 0) strat->interpt=TRUE;
     
    10711075    if(strat->P.IsNull()) continue;
    10721076
    1073    
     1077
    10741078    if( pNext(strat->P.p) == strat->tail )
    10751079    {
     
    11801184
    11811185
     1186#ifdef KDEBUG
    11821187  if (TEST_OPT_DEBUG) messageSets(strat);
     1188#endif
    11831189
    11841190  /* release temp data-------------------------------- */
     
    12391245  // checks...
    12401246  //////////////////////////////////////////////////////////////////////////
    1241   if( rG == NULL ) 
     1247  if( rG == NULL )
    12421248    rG = rGR;
    12431249
     
    12451251  assume(rG  != NULL);
    12461252  assume(rIsPluralRing(rG));
    1247  
     1253
    12481254
    12491255#if MYTEST
     
    12561262    return false;
    12571263
    1258  
     1264
    12591265//  if( (ncRingType(rG) != nc_skew) || (ncRingType(rG) != nc_comm) )
    12601266//    return false;
     
    12701276  PrintS("sca_SetupQuotient: qideal!!!\n");
    12711277#endif
    1272  
     1278
    12731279  if((rG->qideal != NULL) && (rG != rGR) ) // we cannot change from factor to factor at the time, sorry!
    12741280    return false;
     
    12841290  PrintS("sca_SetupQuotient: AltVars?!\n");
    12851291#endif
    1286  
     1292
    12871293  for(int i = 1; i < N; i++)
    12881294  {
     
    13191325#endif
    13201326
    1321  
     1327
    13221328  if( (iAltVarEnd == -1) || (iAltVarStart == (N+1)) )
    13231329    return false; // either no alternating varables, or a single one => we are in commutative case!
    13241330
    1325  
     1331
    13261332  for(int i = 1; i < N; i++)
    13271333  {
     
    13841390  }
    13851391
    1386  
     1392
    13871393  assume(rGR->qideal != NULL);
    13881394//  assume(rG->qideal == NULL); // ?
     
    13961402#endif
    13971403
    1398  
     1404
    13991405  // check for
    14001406  // y_{iAltVarStart}^2, y_{iAltVarStart+1}^2, \ldots, y_{iAltVarEnd}^2  (iAltVarEnd > iAltVarStart)
     
    14351441#endif
    14361442#endif
    1437  
     1443
    14381444
    14391445  //////////////////////////////////////////////////////////////////////////
     
    14661472  assume(rIsPluralRing(rGR));
    14671473  assume(!rIsSCA(rGR));
    1468  
     1474
    14691475  const int N = rGR->N;
    14701476
     
    14761482  const ideal idQuotient = rGR->qideal;
    14771483
    1478  
     1484
    14791485  ideal tempQ = idQuotient;
    14801486
    14811487  if( b <= N && e >= 1 )
    1482     tempQ = id_KillSquares(idQuotient, b, e, rGR); 
     1488    tempQ = id_KillSquares(idQuotient, b, e, rGR);
    14831489
    14841490  idSkipZeroes( tempQ );
     
    14881494  else
    14891495    rGR->GetNC()->SCAQuotient() = tempQ;
    1490  
     1496
    14911497  ncRingType( rGR, nc_exterior );
    14921498
     
    14991505  if(rSaveRing != rGR)
    15001506    rChangeCurrRing(rSaveRing);
    1501  
     1507
    15021508  return true;
    1503  
     1509
    15041510}
    15051511
     
    16581664
    16591665      strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
     1666      if (strat->P.p!=NULL) strat->initEcart(&strat->P);
    16601667    }//    else
    16611668
    16621669
    16631670    if(strat->P.IsNull()) continue;
    1664    
     1671
    16651672    if (strat->P.p1 == NULL)
    16661673    {
     
    17641771      {
    17651772        assume(p_GetExp(pSave, i, currRing) == 1);
    1766 
    1767         const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing);
    1768 
    1769 #ifdef PDEBUG
    1770         p_Test(pNew, currRing);
    1771 #endif
    1772 
    1773         if( pNew == NULL) continue;
    1774 
    1775         LObject h(pNew); // h = x_i * strat->P
    1776 
    1777         if (TEST_OPT_INTSTRATEGY)
     1773        if (pNext!=NULL)
    17781774        {
    1779 //           h.pCleardenom(); // also does a pContent
    1780           pContent(h.p);
     1775          const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing);
     1776
     1777#ifdef PDEBUG
     1778          p_Test(pNew, currRing);
     1779#endif
     1780
     1781          if( pNew == NULL) continue;
     1782
     1783          LObject h(pNew); // h = x_i * strat->P
     1784
     1785          if (TEST_OPT_INTSTRATEGY)
     1786          {
     1787//            h.pCleardenom(); // also does a pContent
     1788            pContent(h.p);
     1789          }
     1790          else
     1791          {
     1792            h.pNorm();
     1793          }
     1794
     1795          strat->initEcart(&h);
     1796          h.sev = pGetShortExpVector(h.p);
     1797
     1798          int pos;
     1799          if (strat->Ll==-1)
     1800            pos =0;
     1801          else
     1802            pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     1803
     1804          enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
     1805/*
     1806          h.sev = pGetShortExpVector(h.p);
     1807          strat->initEcart(&h);
     1808
     1809          h.PrepareRed(strat->use_buckets);
     1810
     1811          // reduction of the element choosen from L(?)
     1812          red_result = strat->red(&h,strat);
     1813
     1814          // reduction to non-zero new poly
     1815          if (red_result != 1) continue;
     1816
     1817
     1818          int pos = posInS(strat,strat->sl,h.p,h.ecart);
     1819
     1820          // reduce the tail and normalize poly
     1821          if (TEST_OPT_INTSTRATEGY)
     1822          {
     1823            h.pCleardenom();
     1824            if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
     1825            {
     1826              h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
     1827              h.pCleardenom();
     1828            }
     1829          }
     1830          else
     1831          {
     1832            h.pNorm();
     1833            if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
     1834              h.p = redtailBba(&(h),pos-1,strat, withT);
     1835          }
     1836
     1837#ifdef KDEBUG
     1838          if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}
     1839#endif
     1840
     1841//          h.PrepareRed(strat->use_buckets); // ???
     1842
     1843          h.sev = pGetShortExpVector(h.p);
     1844          strat->initEcart(&h);
     1845
     1846          if (strat->Ll==-1)
     1847            pos = 0;
     1848          else
     1849            pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     1850
     1851           enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/
     1852
    17811853        }
    1782         else
    1783         {
    1784           h.pNorm();
    1785         }
    1786 
    1787         strat->initEcart(&h);
    1788         h.sev = pGetShortExpVector(h.p);
    1789 
    1790         int pos;
    1791 
    1792         if (strat->Ll==-1)
    1793           pos =0;
    1794         else
    1795           pos = strat->posInL(strat->L,strat->Ll,&h,strat);
    1796 
    1797         enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
    1798 
    1799 
    1800 /*
    1801         h.sev = pGetShortExpVector(h.p);
    1802         strat->initEcart(&h);
    1803 
    1804         h.PrepareRed(strat->use_buckets);
    1805 
    1806         // reduction of the element choosen from L(?)
    1807         red_result = strat->red(&h,strat);
    1808 
    1809         // reduction to non-zero new poly
    1810         if (red_result != 1) continue;
    1811 
    1812 
    1813         int pos = posInS(strat,strat->sl,h.p,h.ecart);
    1814 
    1815         // reduce the tail and normalize poly
    1816         if (TEST_OPT_INTSTRATEGY)
    1817         {
    1818           h.pCleardenom();
    1819           if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    1820           {
    1821             h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
    1822             h.pCleardenom();
    1823           }
    1824         }
    1825         else
    1826         {
    1827 
    1828           h.pNorm();
    1829           if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    1830             h.p = redtailBba(&(h),pos-1,strat, withT);
    1831         }
    1832 
    1833 
    1834   #ifdef KDEBUG
    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 
    18501854      } // for all x_i \in Ann(lm(P))
    1851 
    1852 
    1853 
    1854 
    1855 
    18561855    } // if red(P) != NULL
    18571856
     
    18961895
    18971896//   if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
    1898 
    18991897//    PrintS("</sca>\n");
    19001898
     
    20312029    if (lrmax< strat->Ll) lrmax=strat->Ll; /*stat*/
    20322030    //test_int_std(strat->kIdeal);
     2031#ifdef KDEBUG
    20332032    if (TEST_OPT_DEBUG) messageSets(strat);
     2033#endif
    20342034    if (TEST_OPT_DEGBOUND
    20352035    && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
     
    20702070      strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
    20712071    }
    2072    
    2073    
     2072
     2073
    20742074
    20752075    if (strat->P.p1 == NULL)
     
    25502550
    25512551  assume( (iFirstAltVar >= 1) && (iLastAltVar <= r->N) && (iFirstAltVar <= iLastAltVar) );
    2552  
     2552
    25532553  const int iSize = id->idelems();
    25542554
Note: See TracChangeset for help on using the changeset viewer.