Changeset 48aa42 in git


Ignore:
Timestamp:
Dec 14, 2000, 5:38:55 PM (23 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
de99f1185094a2e1b309d4e78f838d6692f38f51
Parents:
d84b58726ff416e01f33ee72cac5d136ef2515c5
Message:
opt(redThrough) etc added


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

Legend:

Unmodified
Added
Removed
  • Singular/Makefile.in

    rd84b58 r48aa42  
    601601
    602602p_Procs_Lib_%.dl_og : p_Procs_Lib.cc  p_Procs_Dynamic.og
    603         ${CXX} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
     603        ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    604604
    605605%.dl_og: %.cc
     
    682682
    683683p_Procs_Lib_%.dl_op : p_Procs_Lib.cc p_Procs_Dynamic.op
    684         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
     684        ${CXXP} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    685685
    686686%.dl_op: %.cc
     
    721721
    722722p_Procs_Lib_%.dl_ob : p_Procs_Lib.cc  p_Procs_Dynamic.ob
    723         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
     723        ${CXXP} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    724724
    725725%.dl_ob: %.cc
     
    756756#
    757757p_Procs_%.sot: p_Procs_Lib_%.dl_ot
    758         ${CXX} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@
     758        ${CXXP} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@
    759759
    760760p_Procs_Lib_%.dl_ot : p_Procs_Lib.cc p_Procs_Dynamic.ot
    761         ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
     761        ${CXXP} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} ${SFLAGS} -Dp_Procs_$* -c $< -o $@
    762762
    763763%.dl_ot: %.cc
     
    765765
    766766mpsr.sot: $(MPSR_SOURCES:.cc=.dl_ot)
    767         ${CXX} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
     767        ${CXXP} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}
    768768
    769769dbmsr.sot: $(DBMSR_SOURCES:.cc=.dl_ot)
     
    821821
    822822$(OBJA2) : %.oa: %.c
    823         $(CCP)  ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@
     823        $(CC)  ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@
    824824
    825825Singulara${S_EXT}: scanner.cc   $(OBJA) iparith.oa mpsr_Tok.oa claptmpl.oa tesths.cc version.h  mmalloc.oa $(DL_LIBSA)
    826         $(CXXP) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara${S_EXT} \
     826        $(CXX) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara${S_EXT} \
    827827        tesths.cc iparith.oa mpsr_Tok.oa claptmpl.oa $(OBJA) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.oa \
    828828        ${LD_DYN_FLAGS}
    829829
    830830iparith.oa: iparith.inc iparith.cc
    831         $(CXXP)  ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c iparith.cc -o iparith.oa
     831        $(CXX)  ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c iparith.cc -o iparith.oa
    832832
    833833mpsr_Tok.oa: iparith.inc mpsr_Tok.cc
    834         $(CXXP) ${CXXFLAGAT} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFSA} -c mpsr_Tok.cc -o mpsr_Tok.oa
     834        $(CXX) ${CXXFLAGAT} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFSA} -c mpsr_Tok.cc -o mpsr_Tok.oa
    835835
    836836#
  • Singular/hilb.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: hilb.cc,v 1.17 2000-12-12 08:44:44 obachman Exp $ */
     4/* $Id: hilb.cc,v 1.18 2000-12-14 16:38:48 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Hilbert series
     
    222222    return hseries1;
    223223  }
     224
    224225  if (wdegree == NULL)
    225   {
    226     // hWeight();
    227   }
     226    hWeight();
    228227  else
    229228    hWDegree(wdegree);
     229
    230230  p0 = (int *)omAllocBin(int_bin);
    231231  *p0 = 1;
  • Singular/ideals.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.117 2000-12-12 08:44:44 obachman Exp $ */
     4/* $Id: ideals.cc,v 1.118 2000-12-14 16:38:48 obachman Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    22852285  for (j=0;j<pVariables;j++)
    22862286    if (pGetExp(delVar,j+1)!=0) wv[0][j]=1;
    2287   ord[0] = ringorder_a;
     2287  // use this special ordering: like ringorder_a, except that pFDeg, pWeights
     2288  // ignore it
     2289  ord[0] = ringorder_aa;
    22882290
    22892291  // fill in tmp ring to get back the data later on
     
    23262328    }
    23272329  }
    2328   rChangeCurrRing(&tmpR);
    2329   idDelete(&hh);
    2330   rChangeCurrRing(origR);
     2330  id_Delete(&hh, &tmpR);
    23312331  idSkipZeroes(h3);
    23322332  omFree((ADDRESS)wv[0]);
  • Singular/kInline.cc

    rd84b58 r48aa42  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: kInline.cc,v 1.18 2000-11-28 11:50:51 obachman Exp $
     9 *  Version: $Id: kInline.cc,v 1.19 2000-12-14 16:38:49 obachman Exp $
    1010 *******************************************************************/
    1111#ifndef KINLINE_CC
     
    533533}
    534534
     535KINLINE poly sLObject::LmExtractAndIter()
     536{
     537  poly ret = GetLmTailRing();
     538  poly pn;
     539 
     540  assume(p != NULL || t_p != NULL);
     541 
     542  if (bucket != NULL)
     543  {
     544    pn = kBucketExtractLm(bucket);
     545    if (pn == NULL)
     546      kBucketDestroy(&bucket);
     547  }
     548  else
     549  {
     550    pn = pNext(ret);
     551  }
     552  pLength--;
     553  pNext(ret) = NULL;
     554  if (p != NULL && t_p != NULL)
     555    p_LmFree(p, currRing);
     556   
     557  Set(pn, tailRing);
     558  return ret;
     559}
     560
    535561KINLINE poly sLObject::CanonicalizeP()
    536562{
     
    548574}
    549575
     576KINLINE poly sLObject::GetTP()
     577{
     578  kTest_L(this);
     579  poly tp = GetLmTailRing();
     580  assume(tp != NULL);
     581
     582  if (bucket != NULL)
     583  {
     584    kBucketClear(bucket, &pNext(tp), &pLength);
     585    kBucketDestroy(&bucket);
     586    pLength++;
     587  }
     588  return tp;
     589}
     590
     591   
    550592KINLINE poly sLObject::GetP(omBin lmBin = NULL)
    551593{
     
    871913/***************************************************************
    872914 *
     915 * Misc things
     916 *
     917 ***************************************************************/
     918KINLINE int ksReducePolyTail(LObject* PR, TObject* PW, LObject* Red)
     919{
     920  BOOLEAN ret;
     921  number coef;
     922
     923  assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
     924  ret = ksReducePoly(Red, PW, NULL, &coef);
     925 
     926  if (!ret)
     927  {
     928    if (! n_IsOne(coef, currRing))
     929      PR->Mult_nn(coef);
     930     
     931    n_Delete(&coef, currRing);
     932  }
     933  return ret;
     934}
     935
     936/***************************************************************
     937 *
    873938 * Routines for backwards-Compatibility
    874939 *
     
    919984}
    920985
     986 
    921987#endif // defined(KINLINE) || defined(KUTIL_CC)
    922988#endif // KINLINE_CC
  • Singular/kspoly.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kspoly.cc,v 1.22 2000-11-28 11:50:52 obachman Exp $ */
     4/* $Id: kspoly.cc,v 1.23 2000-12-14 16:38:50 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Routines for Spoly creation and reductions
     
    209209}
    210210
    211 //////////////////////////////////////////////////////////////////////////
    212 // Reduces PR at Current->next with PW
    213 // Assumes PR != NULL, Current contained in PR
    214 //         Current->next != NULL, LM(PW) devides LM(Current->next)
    215 // Changes: PR
    216 // Const:   PW
    217211int ksReducePolyTail(LObject* PR, TObject* PW, poly Current, poly spNoether)
    218212{
    219213  BOOLEAN ret;
     214  number coef;
    220215  poly Lp =     PR->GetLmCurrRing();
    221216  poly Save =   PW->GetLmCurrRing();
     
    230225  LObject Red(pNext(Current), PR->tailRing);
    231226  TObject With(PW, Lp == Save);
    232   number coef;
    233227
    234228  pAssume(!pHaveCommonMonoms(Red.p, With.p));
  • Singular/kstd1.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd1.cc,v 1.69 2000-12-12 08:44:45 obachman Exp $ */
     4/* $Id: kstd1.cc,v 1.70 2000-12-14 16:38:50 obachman Exp $ */
    55/*
    66* ABSTRACT:
    77*/
    88
    9 // define if LDEG should not be used in inner reduction loops
    10 // #define NO_LDEG
    11 
    129// define if buckets should be used
    13 // #define MORA_USE_BUCKETS
     10#define MORA_USE_BUCKETS
    1411
    1512// define if tailrings should be used
     
    4340                |Sy_bit(OPT_INTERRUPT)     /*  4 */
    4441                |Sy_bit(OPT_SUGARCRIT)     /*  5 */
     42                |Sy_bit(OPT_REDTHROUGH)
    4543                |Sy_bit(OPT_FASTHC)        /* 10 */
    4644                |Sy_bit(OPT_KEEPVARS)      /* 21 */
     
    5856                |Sy_bit(5)
    5957                |Sy_bit(6)
    60 //                |Sy_bit(7) obachman 11/00 tossed
     58//                |Sy_bit(7) obachman 11/00 tossed: 12/00 used for redThrough
     59  |Sy_bit(OPT_REDTHROUGH)
    6160//                |Sy_bit(8) obachman 11/00 tossed
    6261                |Sy_bit(9)
     
    402401    if (!strat->homog)
    403402    {
    404 #ifdef NO_LDEG
     403#ifndef HAVE_OLD_STD
    405404      if (strat->honey)
    406405      {
     
    909908    if (BTEST1(27))
    910909      return;
    911     if (!BTEST1(20))        /*- take the first possible -*/
    912     {
    913       strat->red = redFirst;
    914       strat->use_buckets = kMoraUseBucket(strat);
    915     }
     910    strat->red = redFirst;
     911    strat->use_buckets = kMoraUseBucket(strat);
    916912    updateT(strat);
    917913    strat->posInT = posInT2;
     
    15301526long kModDeg(poly p, ring r)
    15311527{
    1532   // Hmm obachman: on 1-2, this is pTotalDegree
    1533   // I think that I had changed this to pWDegree sometime in 10/2000
    1534   // However, this breaks eliminate, etc
    1535   // long o=pWDegree(p, r);
    1536   long o=pTotaldegree(p, r);
     1528#ifndef HAVE_OLD_STD
     1529  long o=pWDegree(p, r);
     1530#else
     1531  long o = pTotaldegree(p,r);
     1532#endif
    15371533  long i=p_GetComp(p, r);
    15381534  if (i==0) return o;
     
    15601556  kStrategy strat=new skStrategy;
    15611557
     1558#ifdef HAVE_OLD_STD
     1559  test &= ~Sy_bit(OPT_REDTHROUGH);
     1560#endif
     1561 
    15621562  if(!TEST_OPT_RETURN_SB)
    15631563    strat->syzComp = syzComp;
     
    15961596  if (h==isHomog)
    15971597  {
    1598     if ((w!=NULL) && (*w!=NULL))
     1598    if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
    15991599    {
    16001600      strat->kModW = kModW = *w;
     
    16891689  if (h==isHomog)
    16901690  {
    1691     if ((w!=NULL) && (*w!=NULL))
     1691    if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
    16921692    {
    16931693      kModW = *w;
  • Singular/kstd2.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kstd2.cc,v 1.66 2000-12-12 08:44:46 obachman Exp $ */
     4/* $Id: kstd2.cc,v 1.67 2000-12-14 16:38:51 obachman Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: alg. of Buchberger
     
    214214        if (TEST_OPT_DEBUG) Print(" ->L[%d]\n",at);
    215215#endif
    216         h->CanonicalizeP();
    217216        enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
    218217        h->Clear();
     
    283282     * end of search: have to reduce with pi
    284283     */
    285     if ((pass!=0) && (ei > h->ecart))
     284    if (!TEST_OPT_REDTHROUGH && (pass!=0) && (ei > h->ecart))
    286285    {
    287286      h->SetLmCurrRing();
     
    353352    pass++;
    354353    d = h_d + h->ecart;
    355     if ((strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
     354    if (!TEST_OPT_REDTHROUGH && (strat->Ll >= 0) && ((d > reddeg) || (pass > strat->LazyPass)))
    356355    {
    357356      h->SetLmCurrRing();
     
    498497  int   olddeg,reduc;
    499498  int hilbeledeg=1,hilbcount=0,minimcnt=0;
    500 #ifdef PROT_LENGTH
    501   int length;
    502 #endif
    503 
     499  BOOLEAN withT = FALSE;
     500 
    504501  initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/
    505502  initBuchMoraPos(strat);
     
    515512    strat->use_buckets = 1;
    516513
     514  // redtailBBa against T for inhomogenous input
     515#ifndef HAVE_OLD_STD
     516  withT = ! strat->homog;
     517#endif
     518 
    517519  kTest_TS(strat);
    518520 
     
    598600        if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    599601        {
    600           strat->P.p = redtailBba(&(strat->P),pos-1,strat);
     602          strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT);
    601603          strat->P.pCleardenom();
    602604        }
     
    606608        strat->P.pNorm();
    607609        if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    608           strat->P.p = redtailBba(&(strat->P),pos-1,strat);
     610          strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT);
    609611      }
    610612
     
    635637
    636638      // enter into S, L, and T
    637 #ifdef PROT_LENGTH
    638       if (TEST_OPT_PROT)
    639       {
    640         length += strat->P.GetpLength();
    641         Print("[%d:%d]", strat->P.GetpLength(), length);
    642       }
    643 #endif
    644639      enterT(strat->P, strat);
    645640      enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
  • Singular/kutil.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: kutil.cc,v 1.82 2000-12-12 08:44:46 obachman Exp $ */
     4/* $Id: kutil.cc,v 1.83 2000-12-14 16:38:51 obachman Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for kStd
     
    2828// system memmove -- it does not seem to pay off, though
    2929// #define ENTER_USE_MYMEMMOVE
     30
     31// define if redtailBba should use buckets
     32#define HAVE_REDTAIL_BUCKETS
    3033
    3134#include "tok.h"
     
    26572660}
    26582661
    2659 // #define OLD_RED_TAIL
    2660 #ifdef OLD_RED_TAIL
    2661 /*2
    2662 * reduces h using the set S
    2663 * procedure used in redtail
    2664 */
    2665 /*2
    2666 *compute the normalform of the tail p->next of p
    2667 *with respect to S
    2668 */
    2669 poly redtail (poly p, int pos, kStrategy strat)
    2670 {
    2671   if ((!strat->noTailReduction) && (pNext(p)!=NULL))
    2672   {
    2673     int j, e, l;
    2674     unsigned long not_sev;
    2675 
    2676     poly h = p;
    2677     poly hn = pNext(h); // !=NULL
    2678     int op = pFDeg(hn);
    2679     BOOLEAN save_HE=strat->kHEdgeFound;
    2680     strat->kHEdgeFound |= ((Kstd1_deg>0) && (op<=Kstd1_deg))
    2681                           || TEST_OPT_INFREDTAIL;
    2682     loop
    2683     {
    2684       not_sev = ~ pGetShortExpVector(hn);
    2685       e = pLDeg(hn,&l)-op;
    2686       j = 0;
    2687       while (j <= pos)
    2688       {
    2689         if (pLmShortDivisibleBy(strat->S[j], strat->sevS[j], hn, not_sev)
    2690             &&
    2691             ((e >= strat->ecartS[j]) || strat->kHEdgeFound))
    2692         {
    2693           strat->redTailChange=TRUE;
    2694           ksOldSpolyTail(strat->S[j], p, h, strat->kNoether);
    2695           hn = pNext(h);
    2696           if (hn == NULL) goto all_done;
    2697           not_sev = ~ pGetShortExpVector(hn);
    2698           op = pFDeg(hn);
    2699           if ((Kstd1_deg>0)&&(op>Kstd1_deg)) goto all_done;
    2700           e = pLDeg(hn,&l)-op;
    2701           j = 0;
    2702         }
    2703         else
    2704         {
    2705           j++;
    2706         }
    2707       } /* while (j <= pos) */
    2708       h = hn; /* better for: pIter(h); */
    2709       hn = pNext(h);
    2710       if (hn==NULL) break;
    2711       op = pFDeg(hn);
    2712       if ((Kstd1_deg>0)&&(op>Kstd1_deg)) break;
    2713     }
    2714 all_done:
    2715     strat->kHEdgeFound = save_HE;
    2716   }
    2717   return p;
    2718 }
    2719 #else
    27202662poly redtail (poly p, int pos, kStrategy strat)
    27212663{
     
    27232665  return redtail(&L, pos, strat);
    27242666}
     2667
     2668
     2669#ifndef OLD_REDTAIL_BBA
     2670poly redtailBba (LObject* L, int pos, kStrategy strat, BOOLEAN withT)
     2671{
     2672  strat->redTailChange=FALSE;
     2673  if (strat->noTailReduction) return L->GetLmCurrRing();
     2674  poly h, p;
     2675
     2676  TObject* With;
     2677  // placeholder in case strat->tl < 0
     2678  TObject  With_s(strat->tailRing);
     2679 
     2680  h = L->GetLmTailRing();
     2681  p = h;
     2682  LObject Ln(pNext(h), strat->tailRing);
     2683  Ln.pLength = L->GetpLength() - 1;
     2684
     2685  pNext(h) = NULL;
     2686  if (L->p != NULL) pNext(L->p) = NULL;
     2687  L->pLength = 1;
     2688
     2689#ifdef HAVE_REDTAIL_BUCKETS 
     2690  Ln.PrepareRed(strat->use_buckets);
    27252691#endif
    27262692
    2727 poly redtailBba (LObject* L, int pos, kStrategy strat)
     2693  while(!Ln.IsNull())
     2694  {
     2695    while (1)
     2696    {
     2697      Ln.SetShortExpVector();
     2698      if (! withT)
     2699      {
     2700        With = kFindDivisibleByInS(strat, pos, &Ln, &With_s);
     2701        if (With == NULL) break;
     2702      }
     2703      else
     2704      {
     2705        int j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, &Ln);
     2706        if (j < 0) break;
     2707        With = &(strat->T[j]);
     2708      }
     2709      if (ksReducePolyTail(L, With, &Ln))
     2710      {
     2711        // reducing the tail would violate the exp bound
     2712        pNext(h) = Ln.GetTP();
     2713        L->pLength += Ln.GetpLength();
     2714        if (L->p != NULL) pNext(L->p) = pNext(p);
     2715        if (kStratChangeTailRing(strat, L))
     2716          return redtailBba(L, pos, strat, withT);
     2717        else
     2718        { // should never get here -- need to fix this
     2719          assume(0);
     2720          return NULL;
     2721        }
     2722      }
     2723      strat->redTailChange=TRUE;
     2724      if (Ln.IsNull()) goto all_done;
     2725    }
     2726    pNext(h) = Ln.LmExtractAndIter();
     2727    pIter(h);
     2728    L->pLength++;
     2729  }
     2730
     2731  all_done:
     2732  if (L->p != NULL) pNext(L->p) = pNext(p);
     2733  assume(pLength(L->p != NULL ? L->p : L->t_p) == L->pLength);
     2734
     2735  if (strat->redTailChange)
     2736  {
     2737    L->last = NULL;
     2738    L->length = 0;
     2739  }
     2740  kTest_L(L);
     2741  return L->GetLmCurrRing();
     2742}
     2743#else
     2744poly redtailBba (LObject* L, int pos, kStrategy strat, BOOLEAN withT)
    27282745{
    27292746  poly h, hn;
     
    27472764      Ln.Set(hn, strat->tailRing);
    27482765      Ln.sev = p_GetShortExpVector(hn, strat->tailRing);
    2749       With = kFindDivisibleByInS(strat, pos, &Ln, &With_s);
    2750       if (With == NULL) break;
     2766      if (! withT)
     2767      {
     2768        With = kFindDivisibleByInS(strat, pos, &Ln, &With_s);
     2769        if (With == NULL) break;
     2770      }
     2771      else
     2772      {
     2773        int j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, &Ln);
     2774        if (j < 0) break;
     2775        With = &(strat->T[j]);
     2776      }
    27512777      if (ksReducePolyTail(L, With, h, strat->kNoether))
    27522778      {
     
    27802806  return p;
    27812807}
    2782 
     2808#endif
    27832809/*2
    27842810*checks the change degree and write progress report
  • Singular/kutil.h

    rd84b58 r48aa42  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: kutil.h,v 1.46 2000-11-28 11:50:54 obachman Exp $ */
     6/* $Id: kutil.h,v 1.47 2000-12-14 16:38:52 obachman Exp $ */
    77/*
    88* ABSTRACT: kernel: utils for kStd
     
    2020#define setmax 16
    2121
    22 // #define HAVE_REDTAIL_WITH_T
     22// define if you want std computations as in Singular version < 2
     23// This disbales RedThrough and tailReductions against T
     24#define HAVE_OLD_STD
     25
    2326#undef NO_KINLINE
    2427#if !defined(KDEBUG) && !defined(NO_INLINE)
     
    133136  // Iterations
    134137  KINLINE void LmDeleteAndIter();
     138  KINLINE poly LmExtractAndIter();
    135139
    136140  // spoly related things
     
    143147  // deletes bucket, makes sure that p and t_p exists
    144148  KINLINE poly GetP(omBin lmBin = NULL);
     149  // similar, except that only t_p exists
     150  KINLINE poly GetTP();
     151
    145152  // does not delete bucket, just canonicalizes it
    146153  // returned poly is such that Lm(p) \in currRing, Tail(p) \in tailRing
     
    303310             LObject* L,const kStrategy strat);
    304311KINLINE poly redtailBba (poly p,int pos,kStrategy strat);
    305 poly redtailBba (LObject *L, int pos,kStrategy strat);
     312poly redtailBba (LObject *L, int pos,kStrategy strat, BOOLEAN withT = FALSE);
    306313poly redtail (poly p,int pos,kStrategy strat);
    307314poly redtail (LObject *L,int pos,kStrategy strat);
     
    440447                     poly spNoether = NULL);
    441448
     449KINLINE int ksReducePolyTail(LObject* PR, TObject* PW, LObject* Red);
     450
    442451// Creates S-Poly of Pair
    443452// Const:   Pair->p1, Pair->p2
     
    447456                   int use_buckets=0, ring tailRing=currRing,
    448457                   poly m1 = NULL, poly m2 = NULL, TObject** R = NULL);
    449 
    450458
    451459/*2
  • Singular/misc.cc

    rd84b58 r48aa42  
    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)  },
    327328  {"intStrategy",  Sy_bit(OPT_INTSTRATEGY),    ~Sy_bit(OPT_INTSTRATEGY)  },
    328329  {"infRedTail",   Sy_bit(OPT_INFREDTAIL),     ~Sy_bit(OPT_INFREDTAIL)  },
  • Singular/p_polys.cc

    rd84b58 r48aa42  
    77 *  Author:  obachman (Olaf Bachmann)
    88 *  Created: 8/00
    9  *  Version: $Id: p_polys.cc,v 1.12 2000-11-24 16:24:43 Singular Exp $
     9 *  Version: $Id: p_polys.cc,v 1.13 2000-12-14 16:38:53 obachman Exp $
    1010 *******************************************************************/
    1111
     
    243243      case ringorder_Dp:
    244244      case ringorder_Ds:
     245      case ringorder_rp:
    245246        for (k=r->block0[i];k<=r->block1[i];k++)
    246247        {
     
    252253      case ringorder_S:
    253254      case ringorder_s:
     255      case ringorder_aa:
    254256        break;
    255257      case ringorder_a:
  • Singular/polys.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys.cc,v 1.70 2000-12-01 14:07:49 Singular Exp $ */
     4/* $Id: polys.cc,v 1.71 2000-12-14 16:38:53 obachman Exp $ */
    55
    66/*
     
    6060    if ((r->LexOrder) || (r->OrdSgn==-1))
    6161      test &= ~Sy_bit(OPT_REDTAIL); /* noredTail */
     62
     63    if (r->OrdSgn == 1 && ! r->LexOrder)
     64      test |= Sy_bit(OPT_REDTHROUGH);
     65    else
     66      test &= ~Sy_bit(OPT_REDTHROUGH);
    6267  }
    6368}
  • Singular/ring.cc

    rd84b58 r48aa42  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.149 2000-12-12 08:44:51 obachman Exp $ */
     4/* $Id: ring.cc,v 1.150 2000-12-14 16:38:54 obachman Exp $ */
    55
    66/*
     
    5353  "Ws", //ringorder_Ws,
    5454  "L", //ringorder_L,
     55  "aa", //ringorder_aa
    5556  " _" //ringorder_unspec
    5657};
     
    358359            if (rCheckIV(iv)) return TRUE;
    359360            break;
     361          case ringorder_aa:
    360362          case ringorder_a:
    361363            R->block0[n] = last+1;
     
    747749    if ((r->order[l] >= ringorder_lp)
    748750    ||(r->order[l] == ringorder_M)
    749     ||(r->order[l] == ringorder_a))
     751    ||(r->order[l] == ringorder_a)   
     752    ||(r->order[l] == ringorder_aa))
    750753    {
    751754      PrintS("\n//                  : names    ");
     
    19721975}
    19731976
     1977BOOLEAN rHasSimpleOrderAA(ring r)
     1978{
     1979  int blocks = rBlocks(r) - 1;
     1980  if (blocks != 3) return FALSE;
     1981  return ((r->order[0] == ringorder_aa && r->order[1] != ringorder_M) ||
     1982          (r->order[1] == ringorder_aa && r->order[2] != ringorder_M));
     1983}
     1984
    19741985// return TRUE if p->exp[r->pOrdIndex] holds total degree of p */
    19751986BOOLEAN rOrd_is_Totaldegree_Ordering(ring r =currRing)
     
    19771988  // Hmm.... what about Syz orderings?
    19781989  return (r->N > 1 &&
    1979           rHasSimpleOrder(r) &&
    1980           (rOrder_is_DegOrdering((rRingOrder_t)r->order[0]) ||
    1981            rOrder_is_DegOrdering(( rRingOrder_t)r->order[1])));
     1990          ((rHasSimpleOrder(r) &&
     1991           (rOrder_is_DegOrdering((rRingOrder_t)r->order[0]) ||
     1992            rOrder_is_DegOrdering(( rRingOrder_t)r->order[1]))) ||
     1993           (rHasSimpleOrderAA(r) &&
     1994            (rOrder_is_DegOrdering((rRingOrder_t)r->order[1]) ||
     1995             rOrder_is_DegOrdering((rRingOrder_t)r->order[2])))));
    19821996}
    19831997
     
    26582672    case ringorder_rp:
    26592673    case ringorder_a:
     2674    case ringorder_aa:
    26602675      if (r->OrdSgn==-1) r->MixedOrder=TRUE;
    26612676      break;
     
    26822697}
    26832698
     2699static void rSetFirstWv(ring r, int i, int* order, int* block1, int** wvhdl)
     2700{
     2701  // cheat for ringorder_aa
     2702  if (order[i] == ringorder_aa)
     2703    i++;
     2704  if(block1[i]!=r->N) r->LexOrder=TRUE;
     2705  r->firstBlockEnds=block1[i];
     2706  r->firstwv = wvhdl[i];
     2707}
     2708 
    26842709// set pFDeg, pLDeg, MixOrder, ComponentOrder, etc
    26852710static void rSetDegStuff(ring r)
     
    27562781    if ((r->VectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S)||(order[0]==ringorder_s))
    27572782    {
    2758       if(block1[1]!=r->N) r->LexOrder=TRUE;
    2759       r->firstBlockEnds=block1[1];
    2760       r->firstwv = wvhdl[1];
     2783      rSetFirstWv(r, 1, order, block1, wvhdl);
    27612784    }
    27622785    else
    2763     {
    2764       if(block1[0]!=r->N) r->LexOrder=TRUE;
    2765       r->firstBlockEnds=block1[0];
    2766       r->firstwv = wvhdl[0];
    2767     }
     2786      rSetFirstWv(r, 0, order, block1, wvhdl);
     2787
    27682788    /*the number of orderings:*/
    27692789    int i = 0;
     
    28552875  for(i=0;i<n;i++)
    28562876  {
     2877    tmp_typ[typ_i].order_index=i;
    28572878    switch (r->order[i])
    28582879    {
    28592880      case ringorder_a:
     2881      case ringorder_aa:
    28602882        rO_WDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,tmp_typ[typ_i],
    28612883                   r->wvhdl[i]);
     
    31133135  if (i==r->pCompIndex) i++;
    31143136  while ((j < r->OrdSize)
    3115   && ((r->typ[j].ord_typ==ro_syzcomp) || (r->typ[j].ord_typ==ro_syz)))
     3137         && ((r->typ[j].ord_typ==ro_syzcomp) ||
     3138             (r->typ[j].ord_typ==ro_syz) ||
     3139             (r->order[r->typ[j].order_index] == ringorder_aa)))
    31163140  {
    31173141    i++; j++;
  • Singular/ring.h

    rd84b58 r48aa42  
    77* ABSTRACT - the interpreter related ring operations
    88*/
    9 /* $Id: ring.h,v 1.60 2000-12-06 11:03:29 Singular Exp $ */
     9/* $Id: ring.h,v 1.61 2000-12-14 16:38:55 obachman Exp $ */
    1010
    1111/* includes */
     
    184184  ringorder_Ws,
    185185  ringorder_L,
     186  // the following are only used internally
     187  ringorder_aa, // for idElimination, like a, except pFDeg, pWeigths ignore it
    186188  ringorder_unspec
    187189} rRingOrder_t;
  • Singular/structs.h

    rd84b58 r48aa42  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: structs.h,v 1.47 2000-12-13 17:49:40 Singular Exp $ */
     6/* $Id: structs.h,v 1.48 2000-12-14 16:38:55 obachman Exp $ */
    77/*
    88* ABSTRACT
     
    318318{
    319319  ro_typ  ord_typ;
     320  int     order_index; // comes from r->order[order_index]
    320321  union
    321322  {
  • Singular/tok.h

    rd84b58 r48aa42  
    77* ABSTRACT: tokens, types for interpreter; general macros
    88*/
    9 /* $Id: tok.h,v 1.46 2000-12-13 17:49:40 Singular Exp $ */
     9/* $Id: tok.h,v 1.47 2000-12-14 16:38:55 obachman Exp $ */
    1010
    1111#ifndef MYYSTYPE
     
    188188#define OPT_SUGARCRIT      5
    189189#define OPT_DEBUG          6
     190#define OPT_REDTHROUGH     7
    190191#define OPT_RETURN_SB      9
    191192#define OPT_FASTHC        10
     
    219220#define TEST_OPT_NOTREGULARITY     BTEST1(OPT_NOTREGULARITY)
    220221#define TEST_OPT_WEIGHTM           BTEST1(OPT_WEIGHTM)
     222#define TEST_OPT_REDTHROUGH        BTEST1(OPT_REDTHROUGH)
    221223
    222224#define TEST_VERB_NSB              BVERBOSE(V_NSB)
Note: See TracChangeset for help on using the changeset viewer.