Changeset bef194 in git


Ignore:
Timestamp:
Dec 18, 2000, 2:30:39 PM (22 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
64b116830d916500b5f224c29ed87bb214f3c975
Parents:
35f23db1d98503370c2432aebc628c69b0560444
Message:
* new options: redThrough and oldStd
* increased version to 1.3.11


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

Legend:

Unmodified
Added
Removed
  • Singular/configure

    r35f23d rbef194  
    600600SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1}
    601601SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3}
    602 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-10}
     602SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-11}
    603603SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
    604 VERSION_DATE=${VERSION_DATE:-"November 2000"}
     604VERSION_DATE=${VERSION_DATE:-"December 2000"}
    605605
    606606
  • Singular/configure.in

    r35f23d rbef194  
    4848SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1}
    4949SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3}
    50 SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-10}
     50SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-11}
    5151SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}"
    52 VERSION_DATE=${VERSION_DATE:-"November 2000"}
     52VERSION_DATE=${VERSION_DATE:-"December 2000"}
    5353
    5454dnl pass them on into the Makefiles
  • Singular/kstd1.cc

    r35f23d rbef194  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.72 2000-12-15 11:33:58 obachman Exp $ */
     4/* $Id: kstd1.cc,v 1.73 2000-12-18 13:30:35 obachman Exp $ */
    55/*
    66* ABSTRACT:
     
    4141                |Sy_bit(OPT_SUGARCRIT)     /*  5 */
    4242                |Sy_bit(OPT_REDTHROUGH)
     43                |Sy_bit(OPT_OLDSTD)
    4344                |Sy_bit(OPT_FASTHC)        /* 10 */
    4445                |Sy_bit(OPT_KEEPVARS)      /* 21 */
     
    7071                |Sy_bit(18)
    7172                |Sy_bit(19)
    72 //                |Sy_bit(20) obachman 11/00 tossed
     73//                |Sy_bit(20) obachman 11/00 tossed: 12/00 used for redOldStd
     74  |Sy_bit(OPT_OLDSTD)
    7375                |Sy_bit(21)
    7476                |Sy_bit(22)
     
    225227
    226228    // end of search: have to reduce with pi
    227     if (ei > h->ecart)
     229    if (!K_TEST_OPT_REDTHROUGH && ei > h->ecart)
    228230    {
    229231      // It is not possible to reduce h with smaller ecart;
     
    298300     *-if the number of pre-defined reductions jumps
    299301     */
    300     if ((strat->Ll >= 0)
     302    if (!K_TEST_OPT_REDTHROUGH && (strat->Ll >= 0)
    301303        && ((d >= reddeg) || (pass > strat->LazyPass)))
    302304    {
     
    401403    if (!strat->homog)
    402404    {
    403 #ifndef HAVE_OLD_STD
    404       if (strat->honey)
     405      if (!K_TEST_OPT_OLDSTD && strat->honey)
    405406      {
    406407        h->SetpFDeg();
     
    413414      }
    414415      else
    415 #endif
    416       d = h->SetDegStuffReturnLDeg(strat->LDegLast);
     416        d = h->SetDegStuffReturnLDeg(strat->LDegLast);
    417417      /*- try to reduce the s-polynomial -*/
    418418      pass++;
     
    422422       *-if the number of pre-defined reductions jumps
    423423       */
    424       if ((strat->Ll >= 0)
     424      if (!K_TEST_OPT_REDTHROUGH && (strat->Ll >= 0)
    425425          && ((d >= reddeg) || (pass > strat->LazyPass)))
    426426      {
     
    10711071  int olddeg = 0;
    10721072  int reduc = 0;
     1073  int red_result = 1;
    10731074  int hilbeledeg=1,hilbcount=0;
    10741075
     
    11741175      // might be NULL from noether !!!
    11751176      if (TEST_OPT_PROT)
    1176         message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat);
     1177        message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
    11771178      // reduce
    1178       strat->red(&strat->P,strat);
     1179      red_result = strat->red(&strat->P,strat);
    11791180    }
    11801181
     
    15521553  kStrategy strat=new skStrategy;
    15531554
    1554 #ifdef HAVE_OLD_STD
    1555   test &= ~Sy_bit(OPT_REDTHROUGH);
    1556 #endif
    1557  
    15581555  if(!TEST_OPT_RETURN_SB)
    15591556    strat->syzComp = syzComp;
  • Singular/kstd2.cc

    r35f23d rbef194  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.67 2000-12-14 16:38:51 obachman Exp $ */
     4/* $Id: kstd2.cc,v 1.68 2000-12-18 13:30:36 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    203203    /*- try to reduce the s-polynomial -*/
    204204    pass++;
    205     if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
     205    if (!K_TEST_OPT_REDTHROUGH &&
     206        (strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    206207    {
    207208      h->SetLmCurrRing();
     
    282283     * end of search: have to reduce with pi
    283284     */
    284     if (!TEST_OPT_REDTHROUGH && (pass!=0) && (ei > h->ecart))
     285    if (!K_TEST_OPT_REDTHROUGH && (pass!=0) && (ei > h->ecart))
    285286    {
    286287      h->SetLmCurrRing();
     
    352353    pass++;
    353354    d = h_d + h->ecart;
    354     if (!TEST_OPT_REDTHROUGH && (strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
     355    if (!K_TEST_OPT_REDTHROUGH && (strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    355356    {
    356357      h->SetLmCurrRing();
     
    494495#endif
    495496  om_Opts.MinTrack = 5;
    496   int   srmax,lrmax, red_result;
     497  int   srmax,lrmax, red_result = 1;
    497498  int   olddeg,reduc;
    498499  int hilbeledeg=1,hilbcount=0,minimcnt=0;
     
    513514
    514515  // redtailBBa against T for inhomogenous input
    515 #ifndef HAVE_OLD_STD
    516   withT = ! strat->homog;
    517 #endif
     516  if (!K_TEST_OPT_OLDSTD)
     517    withT = ! strat->homog;
    518518 
     519  // strat->posInT = posInT_pLength;
    519520  kTest_TS(strat);
    520521 
     
    578579    if (TEST_OPT_PROT)
    579580      message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
    580               &olddeg,&reduc,strat);
     581              &olddeg,&reduc,strat, red_result);
    581582
    582583    /* reduction of the element choosen from L */
  • Singular/kstdfac.cc

    r35f23d rbef194  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstdfac.cc,v 1.47 2000-11-09 16:32:51 obachman Exp $ */
     4/* $Id: kstdfac.cc,v 1.48 2000-12-18 13:30:36 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: factorizing alg. of Buchberger
     
    460460{
    461461  int   srmax,lrmax;
    462   int   olddeg,reduc;
    463 
     462  int   olddeg,reduc=0;
     463  int red_result = 1;
    464464  srmax = strat->sl;
    465465  reduc = olddeg = lrmax = 0;
     
    504504    {
    505505      if (TEST_OPT_PROT)
    506         message(strat->P.ecart+pFDeg(strat->P.p),&olddeg,&reduc,strat);
     506        message(strat->P.ecart+pFDeg(strat->P.p),&olddeg,&reduc,strat, red_result);
    507507    }
    508508    else
    509509    {
    510510      if (TEST_OPT_PROT)
    511         message(pFDeg(strat->P.p),&olddeg,&reduc,strat);
     511        message(pFDeg(strat->P.p),&olddeg,&reduc,strat, red_result);
    512512    }
    513513    /* reduction of the element choosen from L */
    514514    kTest_TS(strat);
    515     strat->red(&strat->P,strat);
     515    red_result = strat->red(&strat->P,strat);
    516516    if (strat->P.p != NULL)
    517517    {
  • Singular/kutil.cc

    r35f23d rbef194  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.83 2000-12-14 16:38:51 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.84 2000-12-18 13:30:37 obachman Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    18861886}
    18871887
     1888// determines the position based on: 1.) Ecart 2.) FDeg 3.) pLength
     1889int posInT_EcartFDegpLength(const TSet set,const int length,const LObject &p)
     1890{
     1891
     1892  if (length==-1) return 0;
     1893
     1894  int o = p.ecart;
     1895  int op=p.GetpFDeg();
     1896  int ol = p.GetpLength();
     1897
     1898  if (set[length].ecart < o)
     1899    return length+1;
     1900  if (set[length].ecart == o)
     1901  {
     1902     int oo=set[length].GetpFDeg();
     1903     if ((oo < op) || ((oo==op) && (set[length].length < ol)))
     1904       return length+1;
     1905  }
     1906
     1907  int i;
     1908  int an = 0;
     1909  int en= length;
     1910  loop
     1911  {
     1912    if (an >= en-1)
     1913    {
     1914      if (set[an].ecart > o)
     1915        return an;
     1916      if (set[an].ecart == o)
     1917      {
     1918         int oo=set[an].GetpFDeg();
     1919         if((oo > op)
     1920         || ((oo==op) && (set[an].pLength > ol)))
     1921           return an;
     1922      }
     1923      return en;
     1924    }
     1925    i=(an+en) / 2;
     1926    if (set[i].ecart > o)
     1927      en=i;
     1928    else if (set[i].ecart == o)
     1929    {
     1930       int oo=set[i].GetpFDeg();
     1931       if ((oo > op)
     1932       || ((oo == op) && (set[i].pLength > ol)))
     1933         en=i;
     1934       else
     1935        an=i;
     1936    }
     1937    else
     1938      an=i;
     1939  }
     1940}
     1941
     1942// determines the position based on: 1.) FDeg 2.) pLength
     1943int posInT_FDegpLength(const TSet set,const int length,const LObject &p)
     1944{
     1945
     1946  if (length==-1) return 0;
     1947
     1948  int op=p.GetpFDeg();
     1949  int ol = p.GetpLength();
     1950
     1951  int oo=set[length].GetpFDeg();
     1952  if ((oo < op) || ((oo==op) && (set[length].length < ol)))
     1953    return length+1;
     1954
     1955  int i;
     1956  int an = 0;
     1957  int en= length;
     1958  loop
     1959    {
     1960      if (an >= en-1)
     1961      {
     1962        int oo=set[an].GetpFDeg();
     1963        if((oo > op)
     1964           || ((oo==op) && (set[an].pLength > ol)))
     1965          return an;
     1966        return en;
     1967      }
     1968      i=(an+en) / 2;
     1969      int oo=set[i].GetpFDeg();
     1970      if ((oo > op)
     1971          || ((oo == op) && (set[i].pLength > ol)))
     1972        en=i;
     1973      else
     1974        an=i;
     1975    }
     1976}
     1977
     1978// determines the position based on: 1.) Ecart 2.) pLength
     1979int posInT_EcartpLength(const TSet set,const int length,const LObject &p)
     1980{
     1981  if (length==-1) return 0;
     1982
     1983  int op=p.ecart;
     1984  int ol = p.GetpLength();
     1985
     1986  int oo=set[length].ecart;
     1987  if ((oo < op) || ((oo==op) && (set[length].length < ol)))
     1988    return length+1;
     1989
     1990  int i;
     1991  int an = 0;
     1992  int en= length;
     1993  loop
     1994    {
     1995      if (an >= en-1)
     1996      {
     1997        int oo=set[an].ecart;
     1998        if((oo > op)
     1999           || ((oo==op) && (set[an].pLength > ol)))
     2000          return an;
     2001        return en;
     2002      }
     2003      i=(an+en) / 2;
     2004      int oo=set[i].ecart;
     2005      if ((oo > op)
     2006          || ((oo == op) && (set[i].pLength > ol)))
     2007        en=i;
     2008      else
     2009        an=i;
     2010    }
     2011}
     2012
     2013// determines the position based on: 1.) Ecart 2.) FDeg 3.) pLength
     2014int posInT_pLength(const TSet set,const int length,const LObject &p)
     2015{
     2016  if (length==-1)
     2017    return 0;
     2018  if (set[length].length<p.length)
     2019    return length+1;
     2020
     2021  int i;
     2022  int an = 0;
     2023  int en= length;
     2024  int ol = p.GetpLength();
     2025
     2026  loop
     2027  {
     2028    if (an >= en-1)
     2029    {
     2030      if (set[an].pLength>ol) return an;
     2031      return en;
     2032    }
     2033    i=(an+en) / 2;
     2034    if (set[i].pLength>ol) en=i;
     2035    else                        an=i;
     2036  }
     2037}
     2038 
    18882039/*2
    18892040* looks up the position of p in set
     
    28102961*checks the change degree and write progress report
    28112962*/
    2812 void message (int i,int* reduc,int* olddeg,kStrategy strat)
     2963void message (int i,int* reduc,int* olddeg,kStrategy strat, int red_result)
    28132964{
    28142965  if (i != *olddeg)
     
    28172968    *olddeg = i;
    28182969  }
    2819   if (strat->Ll != *reduc)
    2820   {
    2821     if (strat->Ll != *reduc-1)
    2822       Print("(%d)",strat->Ll+1);
     2970  if (K_TEST_OPT_OLDSTD)
     2971  {
     2972    if (strat->Ll != *reduc)
     2973    {
     2974      if (strat->Ll != *reduc-1)
     2975        Print("(%d)",strat->Ll+1);
     2976      else
     2977        PrintS("-");
     2978      *reduc = strat->Ll;
     2979    }
    28232980    else
     2981      PrintS(".");
     2982    mflush();
     2983  }
     2984  else
     2985  {
     2986    if (red_result == 0)
    28242987      PrintS("-");
    2825     *reduc = strat->Ll;
    2826   }
    2827   else
    2828     PrintS(".");
    2829   mflush();
     2988    else if (red_result < 0)
     2989      PrintS(".");
     2990    else
     2991    {
     2992      if (strat->Ll != *reduc)
     2993      {
     2994        Print("(%d)",strat->Ll+1);
     2995        *reduc = strat->Ll;
     2996      }
     2997    }
     2998  }
    28302999}
    28313000
  • Singular/kutil.h

    r35f23d rbef194  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.47 2000-12-14 16:38:52 obachman Exp $ */
     6/* $Id: kutil.h,v 1.48 2000-12-18 13:30:38 obachman Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    1616#include "omalloc.h"
    1717#include "ring.h"
     18#include "tok.h"
    1819#include "pShallowCopyDelete.h"
    1920
     
    2122
    2223// define if you want std computations as in Singular version < 2
    23 // This disbales RedThrough and tailReductions against T
    24 #define HAVE_OLD_STD
     24// This disbales RedThrough, tailReductions against T (bba),
     25// sets posInT = posInT15 (bba, strat->honey), and enables redFirst with LDeg
     26#define HAVE_OLD_STD
     27
     28#ifdef HAVE_OLD_STD
     29#define K_TEST_OPT_REDTHROUGH 0
     30#define K_TEST_OPT_OLDSTD 1
     31#else
     32#define K_TEST_OPT_REDTHROUGH TEST_OPT_REDTHROUGH
     33#define K_TEST_OPT_OLDSTD     TEST_OPT_OLDSTD
     34#endif
    2535
    2636#undef NO_KINLINE
     
    296306int posInT17 (const TSet set,const int length,const LObject &p);
    297307int posInT19 (const TSet set,const int length,const LObject &p);
     308int posInT_EcartFDegpLength(const TSet set,const int length,const LObject &p);
     309int posInT_FDegpLength(const TSet set,const int length,const LObject &p);
     310int posInT_EcartpLength(const TSet set,const int length,const LObject &p);
     311int posInT_pLength(const TSet set,const int length,const LObject &p);
     312
    298313void reorderS (int* suc,kStrategy strat);
    299314int posInL0 (const LSet set, const int length,
     
    316331void entersets (LObject h);
    317332void pairs ();
    318 void message (int i,int* reduc,int* olddeg,kStrategy strat);
     333void message (int i,int* reduc,int* olddeg,kStrategy strat,int red_result);
    319334void messageStat (int srmax,int lrmax,int hilbcount,kStrategy strat);
    320335#ifdef KDEBUG
  • Singular/misc.cc

    r35f23d rbef194  
    325325  /* 25 no redTail(p)/redTail(s) */
    326326  {"redTail",      Sy_bit(OPT_REDTAIL),        ~Sy_bit(OPT_REDTAIL)  },
    327   {"redThrough",   Sy_bit(OPT_REDTHROUGH),  ~Sy_bit(OPT_REDTHROUGH)  },
     327  {"redThrough",   Sy_bit(OPT_REDTHROUGH),     ~Sy_bit(OPT_REDTHROUGH)  },
     328  {"oldStd",       Sy_bit(OPT_OLDSTD),         ~Sy_bit(OPT_OLDSTD)  },
    328329  {"intStrategy",  Sy_bit(OPT_INTSTRATEGY),    ~Sy_bit(OPT_INTSTRATEGY)  },
    329330  {"infRedTail",   Sy_bit(OPT_INFREDTAIL),     ~Sy_bit(OPT_INFREDTAIL)  },
     
    420421        {
    421422          test |= optionStruct[i].setval;
     423          // optOldStd disables redthrough
     424          if (optionStruct[i].setval == Sy_bit(OPT_OLDSTD))
     425            test &= ~Sy_bit(OPT_REDTHROUGH);
    422426        }
    423427        else
  • Singular/polys.cc

    r35f23d rbef194  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys.cc,v 1.71 2000-12-14 16:38:53 obachman Exp $ */
     4/* $Id: polys.cc,v 1.72 2000-12-18 13:30:38 obachman Exp $ */
    55
    66/*
     
    6161      test &= ~Sy_bit(OPT_REDTAIL); /* noredTail */
    6262
    63     if (r->OrdSgn == 1 && ! r->LexOrder)
     63    if (!TEST_OPT_OLDSTD && r->OrdSgn == 1 && ! r->LexOrder)
    6464      test |= Sy_bit(OPT_REDTHROUGH);
    6565    else
  • Singular/tok.h

    r35f23d rbef194  
    77* ABSTRACT: tokens, types for interpreter; general macros
    88*/
    9 /* $Id: tok.h,v 1.47 2000-12-14 16:38:55 obachman Exp $ */
     9/* $Id: tok.h,v 1.48 2000-12-18 13:30:39 obachman Exp $ */
    1010
    1111#ifndef MYYSTYPE
     
    191191#define OPT_RETURN_SB      9
    192192#define OPT_FASTHC        10
     193#define OPT_OLDSTD        20
    193194#define OPT_KEEPVARS      21
    194195#define OPT_STAIRCASEBOUND 22
     
    221222#define TEST_OPT_WEIGHTM           BTEST1(OPT_WEIGHTM)
    222223#define TEST_OPT_REDTHROUGH        BTEST1(OPT_REDTHROUGH)
     224#define TEST_OPT_OLDSTD            BTEST1(OPT_OLDSTD)
    223225
    224226#define TEST_VERB_NSB              BVERBOSE(V_NSB)
Note: See TracChangeset for help on using the changeset viewer.