Changeset d367e9 in git


Ignore:
Timestamp:
Feb 24, 2006, 11:12:33 AM (18 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e06fee507e546484e81123c1d74f6b8423fcaef5
Parents:
9c6d49554ae6de78686962450083ecb4df5d9cd6
Message:
*bricken: + degBound


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

Legend:

Unmodified
Added
Removed
  • kernel/tgb.cc

    r9c6d49 rd367e9  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb.cc,v 1.71 2006-02-24 07:25:33 bricken Exp $ */
     7/* $Id: tgb.cc,v 1.72 2006-02-24 10:12:33 bricken Exp $ */
    88/*
    99* ABSTRACT: slimgb and F4 implementation
     
    10181018   
    10191019}
    1020 sorted_pair_node** add_to_basis_ideal_quotient(poly h, int i_pos, int j_pos,slimgb_alg* c, int* ip)
     1020sorted_pair_node** add_to_basis_ideal_quotient(poly h, int i_pos, int j_pos,slimgb_alg* c, int* ip, BOOLEAN new_pairs)
    10211021{
    10221022
     
    11151115 
    11161116#undef ENLARGE
     1117 
    11171118  for (j=0;j<i;j++){
    11181119   
     
    11211122    c->states[i][j]=UNCALCULATED;
    11221123    #endif
     1124    if (!new_pairs) continue;
    11231125    assume(p_LmDivisibleBy(c->S->m[i],c->S->m[j],c->r)==
    11241126     p_LmShortDivisibleBy(c->S->m[i],c->short_Exps[i],c->S->m[j],~(c->short_Exps[j]),c->r));
     
    11381140      c->easy_product_crit++;
    11391141      c->states[i][j]=HASTREP;
    1140       continue;
     1142      //continue;
    11411143    }
    11421144    else if(extended_product_criterion(c->S->m[i],c->gcd_of_terms[i],c->S->m[j],c->gcd_of_terms[j],c))
     
    11481150    }
    11491151      //  if (c->states[i][j]==UNCALCULATED){
    1150 
     1152   
    11511153    if ((TEST_V_FINDMONOM) &&(!c->nc)) {
    11521154        //PrintS("COMMU");
     
    11601162//             }
    11611163//         }
    1162         if (c->lengths[i]+c->lengths[j]==3){
     1164        if ((c->lengths[i]+c->lengths[j]==3) &&( (pHasNotCF(c->S->m[i],c->S->m[j])))){
    11631165            poly                 short_s=ksCreateShortSpoly(c->S->m[i],c->S->m[j],c->r);
    11641166            if (short_s==NULL){
     
    15491551    if(curr_deg>=0){
    15501552      if (s->deg >curr_deg) break;
    1551     }
    1552 
     1553     
     1554    }
     1555   
    15531556    else curr_deg=s->deg;
     1557    if ((TEST_OPT_DEGBOUND) && (curr_deg>Kstd1_deg)){
     1558        int j;
     1559        for(j=c->pair_top;j>=0;j--){
     1560            s=c->apairs[j];
     1561            if (s->i<0){
     1562               
     1563                               add_to_basis_ideal_quotient(s->lcm_of_lm,-1,-1,c,NULL,FALSE);
     1564                s->lcm_of_lm=NULL;
     1565                free_sorted_pair_node(s,c->r);
     1566            }
     1567            else
     1568                free_sorted_pair_node(s,c->r);
     1569            c->pair_top--;
     1570            assume(c->pair_top=j-1);
     1571        }
     1572        c->pair_top=-1;
     1573        break;
     1574    }
    15541575    quick_pop_pair(c);
    15551576    if(s->i>=0){
     
    17021723    if (!c->nc)
    17031724      p=redTailShort(p, c->strat);
    1704     sbuf[j]=add_to_basis_ideal_quotient(p,-1,-1,c,ibuf+j);
     1725    sbuf[j]=add_to_basis_ideal_quotient(p,-1,-1,c,ibuf+j, TRUE);
    17051726    //sbuf[j]=add_to_basis(p,-1,-1,c,ibuf+j);
    17061727  }
     
    17451766    for(i=0;i<add2->idelems();i++){
    17461767      if (add2->m[i]!=NULL)
    1747           add_to_basis_ideal_quotient(add2->m[i],-1,-1,c,NULL);
     1768          add_to_basis_ideal_quotient(add2->m[i],-1,-1,c,NULL, TRUE);
    17481769      add2->m[i]=NULL;
    17491770    }
     
    20392060  sorted_pair_node* si;
    20402061  assume(n>0);
    2041   add_to_basis_ideal_quotient(I->m[0],-1,-1,this,NULL);
     2062  add_to_basis_ideal_quotient(I->m[0],-1,-1,this,NULL, TRUE);
    20422063
    20432064  assume(strat->sl==strat->Shdl->idelems()-1);
     
    20652086  {
    20662087    for (i=1;i<n;i++)//the 1 is wanted, because first element is added to basis
    2067       add_to_basis_ideal_quotient(I->m[i],-1,-1,this,NULL);
     2088      add_to_basis_ideal_quotient(I->m[i],-1,-1,this,NULL, TRUE);
    20682089  }
    20692090  for(i=0;i<I->idelems();i++)
     
    21792200//     }
    21802201//   }
    2181 
    2182  
    2183   for(i=0;i<c->n;i++)
    2184   {
    2185     assume(c->S->m[i]!=NULL);
    2186     for(j=0;j<c->n;j++)
    2187     {
    2188       if((c->S->m[j]==NULL)||(i==j))
    2189         continue;
    2190       assume(p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
    2191              c->S->m[i],~c->short_Exps[i],
    2192              c->r)==p_LmDivisibleBy(c->S->m[j],
    2193              c->S->m[i],
    2194              c->r));
    2195       if (p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
    2196           c->S->m[i],~c->short_Exps[i],
    2197           c->r))
     2202  if (!(TEST_OPT_DEGBOUND)){
     2203
     2204  //FIXME: not minimal when using find monomials
     2205      for(i=0;i<c->n;i++)
    21982206      {
    2199         pDelete(&c->S->m[i]);
    2200         break;
    2201       }
    2202     }
     2207        assume(c->S->m[i]!=NULL);
     2208        for(j=0;j<c->n;j++)
     2209        {
     2210          if((c->S->m[j]==NULL)||(i==j))
     2211            continue;
     2212          assume(p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
     2213                 c->S->m[i],~c->short_Exps[i],
     2214                 c->r)==p_LmDivisibleBy(c->S->m[j],
     2215                 c->S->m[i],
     2216                 c->r));
     2217          if (p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
     2218              c->S->m[i],~c->short_Exps[i],
     2219              c->r))
     2220          {
     2221            pDelete(&c->S->m[i]);
     2222            break;
     2223          }
     2224        }
     2225      }
    22032226  }
    22042227  omfree(c->short_Exps);
     
    22182241}
    22192242ideal t_rep_gb(ring r,ideal arg_I, BOOLEAN F4_mode){
    2220  
     2243  //Print("degb ound%d\n",Kstd1_deg);
    22212244  //  Print("QlogSize(0) %d, QlogSize(1) %d,QlogSize(-2) %d, QlogSize(5) %d\n", QlogSize(nlInit(0)),QlogSize(nlInit(1)),QlogSize(nlInit(-2)),QlogSize(nlInit(5)));
    22222245 
  • kernel/tgb_internal.h

    r9c6d49 rd367e9  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb_internal.h,v 1.28 2006-02-24 07:25:34 bricken Exp $ */
     7/* $Id: tgb_internal.h,v 1.29 2006-02-24 10:12:32 bricken Exp $ */
    88/*
    99 * ABSTRACT: tgb internal .h file
     
    211211sorted_pair_node* quick_pop_pair(slimgb_alg* c);
    212212sorted_pair_node* top_pair(slimgb_alg* c);
    213 sorted_pair_node** add_to_basis_ideal_quotient(poly h, int i_pos, int j_pos,slimgb_alg* c, int* ip);
     213sorted_pair_node** add_to_basis_ideal_quotient(poly h, int i_pos, int j_pos,slimgb_alg* c, int* ip, BOOLEAN new_pairs=TRUE);
    214214sorted_pair_node**  spn_merge(sorted_pair_node** p, int pn,sorted_pair_node **q, int qn,slimgb_alg* c);
    215215int kFindDivisibleByInS_easy(kStrategy strat,const red_object & obj);
Note: See TracChangeset for help on using the changeset viewer.