Changeset 52e2f6 in git for kernel/gr_kstd2.cc


Ignore:
Timestamp:
Jun 10, 2008, 12:17:33 PM (16 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
28325ab307b0d45f178c4ce869547de7d3f3faa7
Parents:
f2b58394b7c0b28984794adfcef85f56f72e35bf
Message:
*motsak: major redesign of NC Subsystem, maybe something more...


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

Legend:

Unmodified
Added
Removed
  • kernel/gr_kstd2.cc

    rf2b5839 r52e2f6  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gr_kstd2.cc,v 1.13 2007-02-07 10:49:39 Singular Exp $ */
     4/* $Id: gr_kstd2.cc,v 1.14 2008-06-10 10:17:31 motsak Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: noncomm. alg. of Buchberger
     
    500500      {
    501501        strat->fromT=FALSE;
    502         (*h).p = gnc_ReduceSpolyNew(pi,(*h).p,strat->kNoether,currRing);
     502        (*h).p = nc_ReduceSpoly(pi,(*h).p,strat->kNoether,currRing);
    503503      }
    504504      else
     
    814814}
    815815
     816#define MYTEST 0
     817
    816818ideal gnc_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat)
    817819{
     820#if MYTEST
     821   PrintS("<gnc_gr_bba>\n");
     822#endif
     823
     824#ifdef HAVE_PLURAL
     825#if MYTEST
     826   PrintS("currRing: \n");
     827   rWrite(currRing);
     828#ifdef RDEBUG
     829   rDebugPrint(currRing);
     830#endif
     831
     832   PrintS("F: \n");
     833   idPrint(F); 
     834   PrintS("Q: \n"); 
     835   idPrint(Q);
     836#endif
     837#endif
     838
     839
     840   
    818841  assume(pOrdSgn != -1); // no mora!!! it terminates only for global ordering!!! (?)
    819842
     
    835858  srmax = strat->sl;
    836859  reduc = olddeg = lrmax = 0;
     860
    837861  /* compute------------------------------------------------------- */
    838862  while (strat->Ll >= 0)
    839863  {
    840864    if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/
     865
    841866    if (TEST_OPT_DEBUG) messageSets(strat);
     867
    842868    if (strat->Ll== 0) strat->interpt=TRUE;
    843869    if (TEST_OPT_DEGBOUND
     
    858884    strat->Ll--;
    859885    //kTest(strat);
     886
     887    if (strat->P.p != NULL)
    860888    if (pNext(strat->P.p) == strat->tail)
    861889    {
     
    863891      pLmFree(strat->P.p);
    864892      /* the real one */
    865       if ((ncRingType(currRing)==nc_lie) && pHasNotCF(strat->P.p1,strat->P.p2)) /* prod crit */
    866       {
    867         strat->cp++;
    868         /* prod.crit itself in nc_CreateSpoly */
    869       }
     893      if (ncRingType(currRing)==nc_lie) /* prod crit */
     894        if(pHasNotCF(strat->P.p1,strat->P.p2))
     895        {
     896//          strat->cp++;
     897          /* prod.crit itself in nc_CreateSpoly */
     898        }
     899     
    870900      strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing);
    871     }
     901
     902#ifdef PDEBUG
     903      p_Test(strat->P.p, currRing);
     904#endif
     905
     906#if MYTEST
     907      if (TEST_OPT_DEBUG)
     908      {
     909        PrintS("p1: "); pWrite(strat->P.p1);
     910        PrintS("p2: "); pWrite(strat->P.p2);
     911        PrintS("SPoly: "); pWrite(strat->P.p);
     912      }
     913#endif     
     914    }
     915
     916   
    872917    if (strat->P.p != NULL)
    873918    {
    874919      if (TEST_OPT_PROT)
    875       message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
     920        message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
    876921              &olddeg,&reduc,strat, red_result);
     922
     923#if MYTEST
     924      if (TEST_OPT_DEBUG)
     925      {
     926        PrintS("p1: "); pWrite(strat->P.p1);
     927        PrintS("p2: "); pWrite(strat->P.p2);
     928        PrintS("SPoly before: "); pWrite(strat->P.p);
     929      }
     930#endif
     931
    877932      /* reduction of the element chosen from L */
    878933      strat->red(&strat->P,strat);
     934
     935#if MYTEST
     936      if (TEST_OPT_DEBUG)
     937      {
     938        PrintS("red SPoly: "); pWrite(strat->P.p);
     939      }
     940#endif
     941
    879942    }
    880943    if (strat->P.p != NULL)
     
    913976              if (TEST_OPT_DEBUG)
    914977              {
    915                 PrintS("new s:");
    916                 wrp(strat->P.p);
     978                PrintS("new s:"); wrp(strat->P.p);
    917979                PrintLn();
     980#if MYTEST
     981                Print("s: "); pWrite(strat->P.p);
     982#endif
     983               
    918984              }
    919985              // kTest(strat);
    920986              //
    921987              enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat);
     988             
    922989              if (strat->sl==-1) pos=0;
    923990              else pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
     991             
    924992              strat->enterS(strat->P,pos,strat,-1);
    925993            }
     
    9771045/*   Print("Total pairs considered:%d\n",zaehler); zaehler=0; */
    9781046#endif /*PDEBUG*/
     1047
     1048#if MYTEST
     1049  PrintS("</gnc_gr_bba>\n");
     1050#endif
     1051
    9791052  return (strat->Shdl);
    9801053}
Note: See TracChangeset for help on using the changeset viewer.