Changeset cae954 in git


Ignore:
Timestamp:
Feb 24, 2006, 1:57:38 PM (18 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
cb1f9b76e8a13445d296089700e56745f63ef5bd
Parents:
bdabc89c64ddfdf9785490a67e7aef5a1656f7a4
Message:
*bricken: reverted back, no idea, why this is was so slow


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

Legend:

Unmodified
Added
Removed
  • kernel/tgb.cc

    rbdabc8 rcae954  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb.cc,v 1.75 2006-02-24 11:53:50 bricken Exp $ */
     7/* $Id: tgb.cc,v 1.76 2006-02-24 12:57:38 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, BOOLEAN new_pairs)
     1020sorted_pair_node** add_to_basis_ideal_quotient(poly h, int i_pos, int j_pos,slimgb_alg* c, int* ip)
    10211021{
    10221022
     
    11151115 
    11161116#undef ENLARGE
    1117  
    11181117  for (j=0;j<i;j++){
    11191118   
     
    11221121    c->states[i][j]=UNCALCULATED;
    11231122    #endif
    1124     if (!new_pairs) continue;
    11251123    assume(p_LmDivisibleBy(c->S->m[i],c->S->m[j],c->r)==
    11261124     p_LmShortDivisibleBy(c->S->m[i],c->short_Exps[i],c->S->m[j],~(c->short_Exps[j]),c->r));
     
    11341132    if ((!c->nc) && (c->lengths[i]==1) && (c->lengths[j]==1)){
    11351133      c->states[i][j]=HASTREP;
    1136       //continue;
     1134     
    11371135      }
    11381136    else if ((!(c->nc)) &&  (pHasNotCF(c->S->m[i],c->S->m[j])))
     
    11401138      c->easy_product_crit++;
    11411139      c->states[i][j]=HASTREP;
    1142      
    1143       //continue;
     1140      continue;
    11441141    }
    11451142    else if(extended_product_criterion(c->S->m[i],c->gcd_of_terms[i],c->S->m[j],c->gcd_of_terms[j],c))
     
    11511148    }
    11521149      //  if (c->states[i][j]==UNCALCULATED){
    1153    
     1150
    11541151    if ((TEST_V_FINDMONOM) &&(!c->nc)) {
    11551152        //PrintS("COMMU");
     
    11631160//             }
    11641161//         }
    1165         if ((c->lengths[i]+c->lengths[j]==3) &&( (pHasNotCF(c->S->m[i],c->S->m[j])))){
     1162        if (c->lengths[i]+c->lengths[j]==3){
    11661163            poly                 short_s=ksCreateShortSpoly(c->S->m[i],c->S->m[j],c->r);
    11671164            if (short_s==NULL){
     
    15521549    if(curr_deg>=0){
    15531550      if (s->deg >curr_deg) break;
    1554      
    1555     }
    1556    
    1557     else {curr_deg=s->deg;
    1558     if ((TEST_OPT_DEGBOUND) && (curr_deg>Kstd1_deg)){
    1559         int j;
    1560         for(j=c->pair_top;j>=0;j--){
    1561             s=c->apairs[j];
    1562             if (s->i<0){
    1563                
    1564                                add_to_basis_ideal_quotient(s->lcm_of_lm,-1,-1,c,NULL,FALSE);
    1565                 s->lcm_of_lm=NULL;
    1566                 free_sorted_pair_node(s,c->r);
    1567             }
    1568             else
    1569                 free_sorted_pair_node(s,c->r);
    1570             c->pair_top--;
    1571             assume(c->pair_top=j-1);
    1572         }
    1573         c->pair_top=-1;
    1574         break;
    1575     }}
     1551    }
     1552
     1553    else curr_deg=s->deg;
    15761554    quick_pop_pair(c);
    15771555    if(s->i>=0){
     
    17241702    if (!c->nc)
    17251703      p=redTailShort(p, c->strat);
    1726     sbuf[j]=add_to_basis_ideal_quotient(p,-1,-1,c,ibuf+j, TRUE);
     1704    sbuf[j]=add_to_basis_ideal_quotient(p,-1,-1,c,ibuf+j);
    17271705    //sbuf[j]=add_to_basis(p,-1,-1,c,ibuf+j);
    17281706  }
     
    17671745    for(i=0;i<add2->idelems();i++){
    17681746      if (add2->m[i]!=NULL)
    1769           add_to_basis_ideal_quotient(add2->m[i],-1,-1,c,NULL, TRUE);
     1747          add_to_basis_ideal_quotient(add2->m[i],-1,-1,c,NULL);
    17701748      add2->m[i]=NULL;
    17711749    }
     
    20612039  sorted_pair_node* si;
    20622040  assume(n>0);
    2063   add_to_basis_ideal_quotient(I->m[0],-1,-1,this,NULL, TRUE);
     2041  add_to_basis_ideal_quotient(I->m[0],-1,-1,this,NULL);
    20642042
    20652043  assume(strat->sl==strat->Shdl->idelems()-1);
     
    20872065  {
    20882066    for (i=1;i<n;i++)//the 1 is wanted, because first element is added to basis
    2089       add_to_basis_ideal_quotient(I->m[i],-1,-1,this,NULL, TRUE);
     2067      add_to_basis_ideal_quotient(I->m[i],-1,-1,this,NULL);
    20902068  }
    20912069  for(i=0;i<I->idelems();i++)
     
    22012179//     }
    22022180//   }
    2203   if (!(TEST_OPT_DEGBOUND)){
    2204 
    2205   //FIXME: not minimal when using find monomials
    2206       for(i=0;i<c->n;i++)
     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))
    22072198      {
    2208         assume(c->S->m[i]!=NULL);
    2209         for(j=0;j<c->n;j++)
    2210         {
    2211           if((c->S->m[j]==NULL)||(i==j))
    2212             continue;
    2213           assume(p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
    2214                  c->S->m[i],~c->short_Exps[i],
    2215                  c->r)==p_LmDivisibleBy(c->S->m[j],
    2216                  c->S->m[i],
    2217                  c->r));
    2218           if (p_LmShortDivisibleBy(c->S->m[j],c->short_Exps[j],
    2219               c->S->m[i],~c->short_Exps[i],
    2220               c->r))
    2221           {
    2222             pDelete(&c->S->m[i]);
    2223             break;
    2224           }
    2225         }
    2226       }
     2199        pDelete(&c->S->m[i]);
     2200        break;
     2201      }
     2202    }
    22272203  }
    22282204  omfree(c->short_Exps);
     
    22422218}
    22432219ideal t_rep_gb(ring r,ideal arg_I, BOOLEAN F4_mode){
    2244   //Print("degb ound%d\n",Kstd1_deg);
     2220 
    22452221  //  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)));
    22462222 
  • kernel/tgb_internal.h

    rbdabc8 rcae954  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb_internal.h,v 1.29 2006-02-24 10:12:32 bricken Exp $ */
     7/* $Id: tgb_internal.h,v 1.30 2006-02-24 12:57:37 bricken Exp $ */
    88/*
    99 * ABSTRACT: tgb internal .h file
     
    1818#include "polys.h"
    1919#include "stdlib.h"
    20 //#define HAVE_BOOST 1
     20#define HAVE_BOOST 1
    2121#ifdef HAVE_BOOST
    2222#include "boost/dynamic_bitset.hpp"
     
    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, BOOLEAN new_pairs=TRUE);
     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.