Changeset d3963a in git for kernel/GBEngine/kstd1.cc


Ignore:
Timestamp:
May 20, 2016, 6:28:21 PM (8 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
5efbf94d669bac2dd78b4c336ce92d9e823890be
Parents:
546ae0dd928ea610dabff35ddfeaa1a100759fc6
git-author:
Adi Popescu <adi_popescum@yahoo.de>2016-05-20 18:28:21+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2016-05-23 16:43:26+02:00
Message:
fix and activated: preIntegerCheck
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kstd1.cc

    r546ae0 rd3963a  
    22842284  else
    22852285#endif
    2286   if (rField_is_Ring(currRing))
    2287   {
    2288     if(nCoeff_is_Ring_Z(currRing->cf))
    2289     {
    2290         #if 0
    2291         if(nCoeff_is_Ring_Z(currRing->cf))
     2286  {
     2287    #if 1
     2288    //the preinteger check strategy is not for modules
     2289    if(rField_is_Ring(currRing) && nCoeff_is_Ring_Z(currRing->cf) && strat->ak <= 0)
     2290    {
     2291      ideal FCopy = idCopy(F);
     2292      poly pFmon = preIntegerCheck(FCopy, Q);
     2293      if(pFmon != NULL)
     2294      {
     2295        idInsertPoly(FCopy, pFmon);
     2296        #if ADIDEBUG
     2297        printf("\nPreintegerCheck found this constant:\n");pWrite(pFmon);
     2298        #endif
     2299     
     2300        strat->kModW=kModW=NULL;
     2301        if (h==testHomog)
    22922302        {
    2293             ideal FCopy = idCopy(F);
    2294             poly pFmon = preIntegerCheck(FCopy, Q);
    2295             if(pFmon != NULL)
     2303            if (strat->ak == 0)
    22962304            {
    2297               idInsertPoly(FCopy, pFmon);
    2298               #if ADIDEBUG
    2299               printf("\nPreintegerCheck found this constant:\n");pWrite(pFmon);
    2300               #endif
     2305              h = (tHomog)idHomIdeal(FCopy,Q);
     2306              w=NULL;
    23012307            }
    2302             strat->kModW=kModW=NULL;
    2303             if (h==testHomog)
     2308            else if (!TEST_OPT_DEGBOUND)
    23042309            {
    2305                 if (strat->ak == 0)
    2306                 {
    2307                   h = (tHomog)idHomIdeal(FCopy,Q);
    2308                   w=NULL;
    2309                 }
    2310                 else if (!TEST_OPT_DEGBOUND)
    2311                 {
    2312                     h = (tHomog)idHomModule(FCopy,Q,w);
    2313                 }
     2310                h = (tHomog)idHomModule(FCopy,Q,w);
    23142311            }
    2315             currRing->pLexOrder=b;
    2316             if (h==isHomog)
     2312        }
     2313        currRing->pLexOrder=b;
     2314        if (h==isHomog)
     2315        {
     2316          if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
     2317          {
     2318            strat->kModW = kModW = *w;
     2319            if (vw == NULL)
    23172320            {
    2318                 if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
    2319                 {
    2320                   strat->kModW = kModW = *w;
    2321                   if (vw == NULL)
    2322                   {
    2323                     strat->pOrigFDeg = currRing->pFDeg;
    2324                     strat->pOrigLDeg = currRing->pLDeg;
    2325                     pSetDegProcs(currRing,kModDeg);
    2326                     toReset = TRUE;
    2327                   }
    2328                 }
    2329                 currRing->pLexOrder = TRUE;
    2330                 if (hilb==NULL) strat->LazyPass*=2;
     2321              strat->pOrigFDeg = currRing->pFDeg;
     2322              strat->pOrigLDeg = currRing->pLDeg;
     2323              pSetDegProcs(currRing,kModDeg);
     2324              toReset = TRUE;
    23312325            }
    2332             strat->homog=h;
    2333             omTestMemory(1);
    2334             if(rHasLocalOrMixedOrdering(currRing))
    2335                 r=mora(FCopy,Q,NULL,hilb,strat);
    2336             else
    2337                 r=bba(FCopy,Q,NULL,hilb,strat);
     2326          }
     2327          currRing->pLexOrder = TRUE;
     2328          if (hilb==NULL) strat->LazyPass*=2;
    23382329        }
     2330        strat->homog=h;
     2331      }
     2332      else
     2333      {
     2334        #if ADIDEBUG
     2335        printf("\npreIntegerCheck didn't found any new information\n");
     2336        #endif
     2337      }
     2338      omTestMemory(1);
     2339      if(w == NULL)
     2340      {
     2341        if(rHasLocalOrMixedOrdering(currRing))
     2342            r=mora(FCopy,Q,NULL,hilb,strat);
    23392343        else
    2340         #endif
    2341         {
    2342             if(rHasLocalOrMixedOrdering(currRing))
    2343                 r=mora(F,Q,NULL,hilb,strat);
    2344             else
    2345                 r=bba(F,Q,NULL,hilb,strat);
    2346         }
     2344            r=bba(FCopy,Q,NULL,hilb,strat);
     2345      }
     2346      else
     2347      {
     2348        if(rHasLocalOrMixedOrdering(currRing))
     2349            r=mora(FCopy,Q,*w,hilb,strat);
     2350        else
     2351            r=bba(FCopy,Q,*w,hilb,strat);
     2352      }
     2353      idDelete(&FCopy);
    23472354    }
    23482355    else
    2349     {
    2350       if(rHasLocalOrMixedOrdering(currRing))
    2351         r=mora(F,Q,NULL,hilb,strat);
     2356    #endif
     2357    {
     2358      if(w==NULL)
     2359      {
     2360        if(rHasLocalOrMixedOrdering(currRing))
     2361          r=mora(F,Q,NULL,hilb,strat);
     2362        else
     2363          r=bba(F,Q,NULL,hilb,strat);
     2364      }
    23522365      else
    2353         r=bba(F,Q,NULL,hilb,strat);
    2354     }
    2355   }
    2356   else
    2357   {
    2358     if (rHasLocalOrMixedOrdering(currRing))
    2359     {
    2360       if (w!=NULL)
    2361         r=mora(F,Q,*w,hilb,strat);
    2362       else
    2363         r=mora(F,Q,NULL,hilb,strat);
    2364     }
    2365     else
    2366     {
    2367       if (w!=NULL)
    2368         r=bba(F,Q,*w,hilb,strat);
    2369       else
    2370         r=bba(F,Q,NULL,hilb,strat);
     2366      {
     2367        if(rHasLocalOrMixedOrdering(currRing))
     2368          r=mora(F,Q,*w,hilb,strat);
     2369        else
     2370          r=bba(F,Q,*w,hilb,strat);
     2371      }
    23712372    }
    23722373  }
Note: See TracChangeset for help on using the changeset viewer.