Changeset d64382 in git


Ignore:
Timestamp:
Nov 9, 2006, 9:15:52 AM (17 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
bc5e56344b6761dd9dc617b39142ba3893b23a0c
Parents:
c84b905c9f27db30242a080d84876253a7ce9e2c
Message:
+ sugar for elimination length optimization


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

Legend:

Unmodified
Added
Removed
  • kernel/tgb.cc

    rc84b90 rd64382  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb.cc,v 1.104 2006-10-25 10:14:51 bricken Exp $ */
     7/* $Id: tgb.cc,v 1.105 2006-11-09 08:15:51 bricken Exp $ */
    88/*
    99* ABSTRACT: slimgb and F4 implementation
     
    1111//#include <vector>
    1212//using namespace std;
     13
     14
     15///@TODO: delay nur auf Sugarvergrößerung
     16///@TODO: grade aus ecartS, setze dazu strat->honey; und nutze p.ecart
    1317#include "mod2.h"
    1418#include "tgb.h"
     
    397401}
    398402
    399 wlen_type kEBucketLength(kBucket* b, poly lm,slimgb_alg* ca)
     403wlen_type kEBucketLength(kBucket* b, poly lm,int sugar,slimgb_alg* ca)
    400404{
    401405  wlen_type s=0;
     
    408412  }
    409413  int d=pTotaldegree(lm,ca->r);
     414  #if 1
     415  assume(sugar>=d);
     416  s=1+(bucket_guess(b)-1)*(sugar-d+1);
     417  return s;
     418  #else
     419 
     420 
     421  //int d=pTotaldegree(lm,ca->r);
    410422  int i;
    411423  for (i=b->buckets_used;i>=0;i--)
     
    421433  }
    422434  return s;
     435  #endif
    423436}
    424437
     
    505518    #endif
    506519    //FIXME:not quadratic
    507     wlen_type erg=kEBucketLength(this->bucket,this->p,c);
     520    wlen_type erg=kEBucketLength(this->bucket,this->p,this->sugar,c);
    508521    //erg*=cs;//for quadratic
    509522    erg*=cs;
     
    519532      if(c->eliminationProblem)
    520533  //if (false)
    521   s=kEBucketLength(this->bucket,this->p,c);
     534  s=kEBucketLength(this->bucket,this->p,this->sugar,c);
    522535      else s=bucket_guess(bucket);
    523536    }
     
    18001813    buf[j].sev=pGetShortExpVector(p[j]);
    18011814    buf[j].bucket = kBucketCreate(currRing);
    1802 
     1815    if (c->eliminationProblem){
     1816        buf[j].sugar=pTotaldegree_full(p[j]);
     1817    }
    18031818    int len=pLength(p[j]);
    18041819    kBucketInit(buf[j].bucket,buf[j].p,len);
     
    30903105    int old_length=c->strat->lenS[j];// in view of S
    30913106    los[bp].p=p;
     3107    if (c->eliminationProblem){
     3108        los[bp].sugar=pTotaldegree_full(p);
     3109    }
    30923110    kBucketInit(los[bp].bucket,p,old_length);
    30933111    wlen_type qal=pQuality(clear_into,c,new_length);
     
    32223240    assume((i==losl-1)||(pLmCmp(los[i].p,los[i+1].p)<=0));
    32233241    assume(is_valid_ro(los[i]));
     3242    assume((!(c->eliminationProblem))||(los[i].sugar>=pTotaldegree(los[i].p)));
    32243243    j=kFindDivisibleByInS_easy(strat,los[i]);
    32253244    if(j>=0){
     
    34993518//debug start
    35003519  int im;
    3501 
     3520 
     3521  int reducer_deg;
     3522  if(c->eliminationProblem){
     3523    assume(p_LmEqual(r[l].p,r[u].p,c->r));
     3524    int lm_deg=pTotaldegree(r[l].p);
     3525    reducer_deg=lm_deg+pTotaldegree_full(p)-pTotaldegree(p);
     3526  }
    35023527
    35033528  for(i=l;i<=u;i++){
     
    35063531
    35073532    this->do_reduce(r[i]);
    3508 
     3533    if (c->eliminationProblem){
     3534        r[i].sugar=si_max(r[i].sugar,reducer_deg);
     3535    }
    35093536  }
    35103537  for(i=l;i<=u;i++){
     
    35533580    }
    35543581    pNormalize(red);
    3555 
     3582    if (c->eliminationProblem){
     3583        r[rn].sugar=pTotaldegree_full(red);
     3584    }
    35563585
    35573586    if ((!(erg.fromS))&&(TEST_V_UPTORADICAL)){
  • kernel/tgb_internal.h

    rc84b90 rd64382  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb_internal.h,v 1.45 2006-10-25 10:14:52 bricken Exp $ */
     7/* $Id: tgb_internal.h,v 1.46 2006-11-09 08:15:52 bricken Exp $ */
    88/*
    99 * ABSTRACT: tgb internal .h file
     
    174174  poly p;
    175175  unsigned long sev;
     176  int sugar;
    176177  void flatten();
    177178  void validate();
Note: See TracChangeset for help on using the changeset viewer.