Changeset efb860 in git


Ignore:
Timestamp:
Oct 5, 2006, 8:26:10 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f5bfe4a0668705d924990d960a15282b2a2a3ac1
Parents:
ded4ee6c4c561eaf2513cbc7df1f8b1d60dd0ed1
Message:
*hannes: kFindDivisibleByInS improved


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

Legend:

Unmodified
Added
Removed
  • kernel/kstd1.cc

    rded4ee refb860  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.11 2006-05-19 13:33:25 Singular Exp $ */
     4/* $Id: kstd1.cc,v 1.12 2006-10-05 18:26:09 Singular Exp $ */
    55/*
    66* ABSTRACT:
     
    295295      if (at <= strat->Ll)
    296296      {
    297         if (kFindDivisibleByInS(strat->S, strat->sevS, strat->sl, h) < 0)
     297        if (kFindDivisibleByInS(strat, h) < 0)
    298298        {
    299299          if (strat->honey && !strat->posInLDependsOnLength)
     
    416416        if (at <= strat->Ll)
    417417        {
    418           if (kFindDivisibleByInS(strat->S, strat->sevS, strat->sl, h) < 0)
     418          if (kFindDivisibleByInS(strat, h) < 0)
    419419            return 1;
    420420          enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
  • kernel/kstd2.cc

    rded4ee refb860  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.20 2006-10-05 10:28:47 Singular Exp $ */
     4/* $Id: kstd2.cc,v 1.21 2006-10-05 18:26:10 Singular Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    8181
    8282// same as above, only with set S
    83 int kFindDivisibleByInS(const polyset &S, const unsigned long* sev, const int sl, LObject* L)
     83int kFindDivisibleByInS(const kStrategy strat, LObject* L)
    8484{
    8585  unsigned long not_sev = ~L->sev;
     
    8888
    8989  pAssume(~not_sev == p_GetShortExpVector(p, currRing));
     90  int ende=posInS(strat,strat->sl,p,0)+1;
     91  if (ende>strat->sl) ende=strat->sl;
    9092  loop
    9193  {
    92     if (j > sl) return -1;
     94    if (j > ende) return -1;
    9395#if defined(PDEBUG) || defined(PDIV_DEBUG)
    94     if (p_LmShortDivisibleBy(S[j], sev[j],
     96    if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],
    9597                             p, not_sev, currRing))
    9698        return j;
    9799#else
    98     if ( !(sev[j] & not_sev) &&
    99          p_LmDivisibleBy(S[j], p, currRing))
     100    if ( !(strat->sevS[j] & not_sev) &&
     101         p_LmDivisibleBy(strat->S[j], p, currRing))
    100102      return j;
    101103#endif
     
    555557      {
    556558#if 0
    557         if (kFindDivisibleByInS(strat->S, strat->sevS, strat->sl, h) < 0)
     559        if (kFindDivisibleByInS(strat, h) < 0)
    558560          return 1;
    559561#endif
     
    706708      if (at <= strat->Ll)
    707709      {
    708         if (kFindDivisibleByInS(strat->S, strat->sevS, strat->sl, h) < 0)
     710        if (kFindDivisibleByInS(strat, h) < 0)
    709711          return 1;
    710712        enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
     
    753755#endif
    754756*/
    755       j=kFindDivisibleByInS(strat->S,strat->sevS,strat->sl,&P);
     757      j=kFindDivisibleByInS(strat,&P);
    756758    if (j>=0)
    757759    {
  • kernel/kutil.h

    rded4ee refb860  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.18 2006-08-14 17:08:37 wienand Exp $ */
     6/* $Id: kutil.h,v 1.19 2006-10-05 18:26:10 Singular Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    444444                        const int tl, const LObject* L, const int start=0);
    445445// same with S
    446 int kFindDivisibleByInS(const polyset &S, const unsigned long* sev,
    447                         const int sl, LObject* L);
     446int kFindDivisibleByInS(const kStrategy strat, LObject* L);
    448447
    449448TObject*
  • kernel/tgb.cc

    rded4ee refb860  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb.cc,v 1.100 2006-07-06 07:00:15 bricken Exp $ */
     7/* $Id: tgb.cc,v 1.101 2006-10-05 18:26:10 Singular Exp $ */
    88/*
    99* ABSTRACT: slimgb and F4 implementation
     
    770770    P.p=strat->S[i];
    771771    P.sev=strat->sevS[i];
    772     if(kFindDivisibleByInS(strat->S,strat->sevS,strat->sl,&P)!=i)
     772    if(kFindDivisibleByInS(strat,&P)!=i)
    773773    {
    774774      deleteInS(i,strat);
     
    15471547  loop
    15481548    {
    1549 
    1550       j=kFindDivisibleByInS(strat->S,strat->sevS,strat->sl,&P);
     1549      j=kFindDivisibleByInS(strat,&P);
    15511550      if ((j>=0) && ((!n)||
    15521551        ((strat->lenS[j]<=n) &&
     
    15541553         (strat->lenSw[j]<=n)))))
    15551554      {
    1556 
    1557 
    15581555        nNormalize(pGetCoeff(P.p));
    15591556#ifdef KDEBUG
     
    20292026      loop
    20302027      {
    2031           j=kFindDivisibleByInS(strat->S,strat->sevS,sl,&P);
     2028          j=kFindDivisibleByInS(strat,&P);
    20322029          if (j>=0)
    20332030          {
Note: See TracChangeset for help on using the changeset viewer.