Changeset b1c0a9 in git


Ignore:
Timestamp:
Apr 8, 2009, 7:21:58 PM (15 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
7e676255a90b5015b1bc8fb6430bdaffe6ea7a81
Parents:
a7541b59e5f1a2bdd1a3d8749700ceb15bb5b7a7
Message:
*motsak: fixes due to std_1


git-svn-id: file:///usr/local/Singular/svn/trunk@11657 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/kutil.cc

    ra7541b5 rb1c0a9  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.131 2009-02-27 11:21:24 Singular Exp $ */
     4/* $Id: kutil.cc,v 1.132 2009-04-08 17:21:58 motsak Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    30913091    }
    30923092  }
     3093
     3094  if (strat->noClearS) return;
     3095 
    30933096//   #ifdef HAVE_PLURAL
    3094   if (!rIsPluralRing(currRing))
    3095 //   #endif
    3096   {
     3097/*
     3098  if (rIsPluralRing(currRing))
     3099  {
     3100    j=pos;
     3101    loop
     3102    {
     3103      if (j > k) break;
     3104
     3105      if (pLmDivisibleBy(h, strat->S[j]))
     3106      {
     3107        deleteInS(j, strat);
     3108        j--;
     3109        k--;
     3110      }
     3111     
     3112      j++;
     3113    }
     3114  }   
     3115  else
     3116*/ 
     3117//   #endif // ??? Why was the following cancelation disabled for non-commutative rings?
     3118  {
    30973119    j=pos;
    30983120    loop
  • kernel/sca.cc

    ra7541b5 rb1c0a9  
    77 *  Author:  motsak (Oleksandr Motsak)
    88 *  Created: 2006/12/18
    9  *  Version: $Id: sca.cc,v 1.35 2009-04-03 19:10:36 motsak Exp $
     9 *  Version: $Id: sca.cc,v 1.36 2009-04-08 17:21:58 motsak Exp $
    1010 *******************************************************************/
    1111
     
    17201720  /*set enterS, spSpolyShort, reduce, red, initEcart, initEcartPair*/
    17211721  // ?? set spSpolyShort, reduce ???
    1722   initBuchMora(tempF, tempQ, strat); // tempQ = Q - squares!!!
     1722  initBuchMora(tempF, tempQ, strat); // tempQ = Q without squares!!!
    17231723
    17241724//   if (strat->minim>0) strat->M = idInit(IDELEMS(F),F->rank);
     
    17491749  ///////////////////////////////////////////////////////////////
    17501750  // SCA:
     1751
     1752  //  due to std( SB, p).
     1753  // Note that after initBuchMora :: initSSpecial all these additional
     1754  // elements are in S and T (and some pairs are in L, which also has no initiall
     1755  // elements!!!)
     1756  if(TEST_OPT_SB_1)
     1757  {
     1758    // For all additional elements...
     1759    for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)
     1760    {
     1761      const poly pSave = tempF->m[iNewElement];
     1762
     1763      if( pSave != NULL )
     1764      {
     1765//        tempF->m[iNewElement] = NULL;
     1766
     1767        const poly p_next = pNext(pSave);
     1768
     1769        if(p_next != NULL)
     1770          for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
     1771            if( p_GetExp(pSave, i, currRing) != 0 )
     1772            {
     1773              assume(p_GetExp(pSave, i, currRing) == 1);
     1774
     1775              const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
     1776
     1777#ifdef PDEBUG
     1778              p_Test(p_new, currRing);
     1779#endif
     1780
     1781              if( p_new == NULL) continue;
     1782
     1783              LObject h(p_new); // h = x_i * strat->P
     1784
     1785              if (TEST_OPT_INTSTRATEGY)
     1786                h.pCleardenom(); // also does a pContent
     1787              else
     1788                h.pNorm();
     1789
     1790              strat->initEcart(&h);
     1791              h.sev = pGetShortExpVector(h.p);
     1792
     1793              int pos = 0;
     1794
     1795              if (strat->Ll != -1)
     1796                pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     1797
     1798              enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
     1799            }         
     1800
     1801      }       
     1802
     1803    }
     1804  }
     1805
     1806 
     1807 
    17511808
    17521809  /* compute------------------------------------------------------- */
     
    19141971        if (TEST_OPT_INTSTRATEGY)
    19151972        {
    1916           pContent(h.p);
     1973//          pContent(h.p);
     1974          h.pCleardenom(); // also does a pContent
    19171975        }
    19181976        else
     
    19241982        h.sev = pGetShortExpVector(h.p);
    19251983
    1926         int pos;
    1927         if (strat->Ll==-1)
    1928           pos =0;
    1929         else
     1984        int pos = 0;
     1985
     1986        if (strat->Ll != -1)
    19301987          pos = strat->posInL(strat->L,strat->Ll,&h,strat);
    19311988
     
    21212178#endif
    21222179
    2123   int srmax;
    2124   int lrmax = 0;
    2125   int olddeg = 0;
    2126   int reduc = 0;
    2127   int red_result = 1;
    2128 //  int hilbeledeg=1;
    2129   int hilbcount=0;
    21302180
    21312181  strat->update = TRUE;
     
    21592209  }
    21602210#endif
    2161 
    2162   srmax = strat->sl;
     2211  strat->use_buckets = kMoraUseBucket(strat);
     2212
    21632213  kTest_TS(strat);
    21642214
    2165   strat->use_buckets = kMoraUseBucket(strat);
     2215
     2216  int srmax = strat->sl;
     2217  int lrmax = strat->Ll;
     2218  int olddeg = 0;
     2219  int reduc = 0;
     2220  int red_result = 1;
     2221//  int hilbeledeg=1;
     2222  int hilbcount=0;
     2223
     2224 
    21662225  /*- compute-------------------------------------------*/
    21672226
     
    21722231//     kStratInitChangeTailRing(strat);
    21732232#endif
     2233
     2234
     2235
     2236
     2237 
     2238//  due to std( SB, p)
     2239  if(TEST_OPT_SB_1)
     2240  {
     2241    for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)
     2242    {
     2243
     2244      const poly pSave = tempF->m[iNewElement];
     2245
     2246      if( pSave != NULL )
     2247      {
     2248//        tempF->m[iNewElement] = NULL;
     2249
     2250        const poly p_next = pNext(pSave);
     2251
     2252        if(p_next != NULL)
     2253          for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
     2254            if( p_GetExp(pSave, i, currRing) != 0 )
     2255            {
     2256
     2257              assume(p_GetExp(pSave, i, currRing) == 1);
     2258
     2259              const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
     2260
     2261#ifdef PDEBUG
     2262              p_Test(p_new, currRing);
     2263#endif
     2264
     2265              if( p_new == NULL) continue;
     2266
     2267              LObject h(p_new); // h = x_i * strat->P
     2268
     2269              if (TEST_OPT_INTSTRATEGY)
     2270                h.pCleardenom(); // also does a pContent
     2271              else
     2272                h.pNorm();
     2273
     2274              strat->initEcart(&h);
     2275              h.sev = pGetShortExpVector(h.p);
     2276
     2277              int pos = 0;
     2278
     2279              if (strat->Ll != -1)
     2280                pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     2281
     2282              enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
     2283
     2284              if (strat->Ll>lrmax) lrmax = strat->Ll;
     2285            }         
     2286     
     2287      }     
     2288
     2289    }
     2290  }
     2291
     2292
    21742293
    21752294
     
    23092428        h.sev = pGetShortExpVector(h.p);
    23102429
    2311         int pos;
    2312 
    2313         if (strat->Ll==-1)
    2314           pos = 0;
    2315         else
     2430        int pos = 0;
     2431
     2432        if (strat->Ll != -1)
    23162433          pos = strat->posInL(strat->L,strat->Ll,&h,strat);
    23172434
Note: See TracChangeset for help on using the changeset viewer.