Changeset 36b9ef in git for kernel/gr_kstd2.cc


Ignore:
Timestamp:
Jul 29, 2008, 3:16:44 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
63774ecd0500a3c894a18af2fea779b41ee11c64
Parents:
342c80d50cde81c223648091d8364e6eeb6dc3f3
Message:
hannes: vaoid ratGB in rat_GB


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

Legend:

Unmodified
Added
Removed
  • kernel/gr_kstd2.cc

    r342c80 r36b9ef  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gr_kstd2.cc,v 1.22 2008-07-29 12:38:52 Singular Exp $ */
     4/* $Id: gr_kstd2.cc,v 1.23 2008-07-29 13:16:44 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: noncomm. alg. of Buchberger
     
    253253#endif
    254254        //poly hh = nc_CreateSpoly(strat->S[c_j],(*h).p, currRing);
    255         poly hh=c_p; c_p=NULL;
     255        if(c_e==-1)
     256          c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
     257        else
     258          c_p=nc_rat_ReduceSpolyNew(pCopy(strat->S[c_j]),
     259               pCopy((*h).p),currRing->real_var_start-1,currRing);
    256260        pDelete(&((*h).p));
    257         (*h).p=hh;
     261        (*h).p=c_p;
    258262        if (!TEST_OPT_INTSTRATEGY)
    259263        {
     
    282286        pass++;
    283287        j=0;
    284         c_j=-1; c_e=-2;
     288        c_j=-1; c_e=-2; c_p=NULL;
    285289      }
    286290      else
     
    302306      {
    303307        c_e=-1; c_j=j;
    304         pDelete(&c_p);
    305         c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
    306308      }
    307309    }
     
    321323      {
    322324        c_e=a_e; c_j=j;
    323         pDelete(&c_p);
    324325        //c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
    325         c_p=nc_rat_ReduceSpolyNew(strat->S[c_j],(*h).p,currRing->real_var_start-1,currRing);
    326       }
    327       else if (c_e == a_e)
    328       {
    329          //poly cc_pp= nc_CreateSpoly(pCopy(strat->S[j]),pCopy((*h).p), currRing);
    330          poly cc_pp=nc_rat_ReduceSpolyNew(strat->S[c_j],(*h).p,currRing->real_var_start-1,currRing);
    331          if (((cc_pp==NULL)&&(c_p!=NULL)) || (pCmp(cc_pp,c_p)==-1))
    332          {
    333            assume(pTotaldegree(cc_pp)<=pTotaldegree(c_p));
    334            c_e=a_e; c_j=j;
    335            pDelete(&c_p);
    336            c_p = cc_pp;
    337          }
    338326      }
    339327      /*computes the ecart*/
     
    993981  if (currRing->real_var_start>0)
    994982  {
    995     strat->red=redGrRatGB;
     983    int ii=IDELEMS(F)-1;
     984    int jj;
     985    BOOLEAN is_rat_id=FALSE;
     986    for(;ii>=0;ii--)
     987    {
     988      for(jj=currRing->real_var_start;jj<=currRing->real_var_end;jj++)
     989      {
     990        if(pGetExp(F->m[ii],jj)>0) { is_rat_id=TRUE; break; }
     991      }
     992      if (is_rat_id) break;
     993    }
     994    if (is_rat_id) strat->red=redGrRatGB;
    996995  }
    997996
Note: See TracChangeset for help on using the changeset viewer.