Changeset b3e94aa in git for kernel/kstd2.cc


Ignore:
Timestamp:
Nov 12, 2013, 1:42:25 PM (10 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f9d20d729f6b8b9238916f0b834dcae5c1a763c3
Parents:
5313c099cf9db0abd520c21bc971ae22d8b655fd
git-author:
Christian Eder <ederc@mathematik.uni-kl.de>2013-11-12 13:42:25+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 14:58:02+01:00
Message:
1. implements usage of product criterion in sba
   (disabled by default, still experimental)
2. adds more detailed debugging printouts for sba
   (disabled by default)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/kstd2.cc

    r5313c0 rb3e94aa  
    3737#endif
    3838
     39/***********************************************
     40 * SBA stuff -- start
     41***********************************************/
    3942#define DEBUGF50  0
    4043#define DEBUGF51  0
     
    4548#endif
    4649
    47 #define F5C       1
     50#define F5C       0
    4851#if F5C
    4952  #define F5CTAILRED 0
    5053#endif
     54
     55#define SBA_PRODUCT_CRITERION         0
     56#define SBA_PRINT_ZERO_REDUCTIONS     0
     57#define SBA_PRINT_SIZE_G              0
     58#define SBA_PRINT_SIZE_SYZ            0
     59#define SBA_PRINT_PRODUCT_CRITERION   0
     60/***********************************************
     61 * SBA stuff -- done
     62***********************************************/
    5163
    5264#include <kernel/kutil.h>
     
    14901502  // The corresponding orders are computed in sbaRing(), depending
    14911503  // on the flag strat->incremental
     1504  long zeroreductions     = 0;
     1505  long product_criterion  = 0;
     1506  long size_g             = 0;
     1507  long size_syz           = 0;
     1508
    14921509  ideal F = F0;
    14931510  ring sRing, currRingOld;
     
    15141531  int   olddeg,reduc;
    15151532  int hilbeledeg=1,hilbcount=0,minimcnt=0;
    1516   long zeroreductions = 0;
    15171533  LObject L;
    15181534  // BOOLEAN withT     = FALSE;
     
    16841700#endif
    16851701      /* reduction of the element choosen from L */
    1686       if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat, strat->P.checked+1))
    1687         red_result = strat->red(&strat->P,strat);
    1688       else
    1689       {
     1702      if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat, strat->P.checked+1)) {
     1703#if SBA_PRODUCT_CRITERION
     1704        if (strat->P.checked == 3) {
     1705          product_criterion++;
     1706          enterSyz(strat->P, strat);
     1707          if (strat->P.lcm!=NULL)
     1708            pLmFree(strat->P.lcm);
     1709          red_result = 2;
     1710        } else {
     1711          red_result = strat->red(&strat->P,strat);
     1712        }
     1713#else
     1714      red_result = strat->red(&strat->P,strat);
     1715#endif
     1716      } else {
    16901717        if (strat->P.lcm!=NULL)
    16911718          pLmFree(strat->P.lcm);
     
    19711998  else if (TEST_OPT_PROT) PrintLn();
    19721999
     2000#if SBA_PRINT_SIZE_G
     2001  size_g   = strat->sl+1;
     2002#endif
     2003#if SBA_PRINT_SIZE_SYZ
     2004  size_syz = strat->syzl+1;
     2005#endif
     2006
    19732007  exitSba(strat);
    19742008//  if (TEST_OPT_WEIGHTM)
     
    20182052  }
    20192053#endif
    2020   printf("ZERO REDUCTIONS: %ld\n",zeroreductions);
    2021   zeroreductions  = 0;
     2054#if SBA_PRINT_ZERO_REDUCTIONS
     2055  printf("ZERO REDUCTIONS:   %ld\n",zeroreductions);
     2056#endif
     2057#if SBA_PRINT_SIZE_G
     2058  printf("SIZE OF G:         %ld\n",size_g);
     2059#endif
     2060#if SBA_PRINT_SIZE_SYZ
     2061  printf("SIZE OF SYZ:       %ld\n",size_syz);
     2062#endif
     2063#if SBA_PRINT_PRODUCT_CRITERION
     2064  printf("PRODUCT CRITERIA:  %ld\n",product_criterion);
     2065#endif
     2066  zeroreductions    = 0;
     2067  size_g            = 0;
     2068  size_syz          = 0;
     2069  product_criterion = 0;
    20222070  return (strat->Shdl);
    20232071}
Note: See TracChangeset for help on using the changeset viewer.