Changeset 48aa42 in git
- Timestamp:
- Dec 14, 2000, 5:38:55 PM (22 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- de99f1185094a2e1b309d4e78f838d6692f38f51
- Parents:
- d84b58726ff416e01f33ee72cac5d136ef2515c5
- Location:
- Singular
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.in
rd84b58 r48aa42 601 601 602 602 p_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 $@ 604 604 605 605 %.dl_og: %.cc … … 682 682 683 683 p_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 $@ 685 685 686 686 %.dl_op: %.cc … … 721 721 722 722 p_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 $@ 724 724 725 725 %.dl_ob: %.cc … … 756 756 # 757 757 p_Procs_%.sot: p_Procs_Lib_%.dl_ot 758 ${CXX } ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@758 ${CXXP} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} $< -o $@ 759 759 760 760 p_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 $@ 762 762 763 763 %.dl_ot: %.cc … … 765 765 766 766 mpsr.sot: $(MPSR_SOURCES:.cc=.dl_ot) 767 ${CXX } ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS}767 ${CXXP} ${CXXFLAGST} ${SFLAGS} ${SLDFLAGS} ${LDFLAGS} -o $@ $^ ${MP_LIBS} 768 768 769 769 dbmsr.sot: $(DBMSR_SOURCES:.cc=.dl_ot) … … 821 821 822 822 $(OBJA2) : %.oa: %.c 823 $(CC P) ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@823 $(CC) ${CFLAGSA} ${CPPFLAGS} ${DEFSA} -c $< -o $@ 824 824 825 825 Singulara${S_EXT}: scanner.cc $(OBJA) iparith.oa mpsr_Tok.oa claptmpl.oa tesths.cc version.h mmalloc.oa $(DL_LIBSA) 826 $(CXX P) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara${S_EXT} \826 $(CXX) ${CXXFLAGSA} ${CPPFLAGS} ${DEFSA} -o Singulara${S_EXT} \ 827 827 tesths.cc iparith.oa mpsr_Tok.oa claptmpl.oa $(OBJA) ${LDFLAGS} ${LIBS} -lomalloc mmalloc.oa \ 828 828 ${LD_DYN_FLAGS} 829 829 830 830 iparith.oa: iparith.inc iparith.cc 831 $(CXX P) ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c iparith.cc -o iparith.oa831 $(CXX) ${CXXFLAGSA} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSA} -c iparith.cc -o iparith.oa 832 832 833 833 mpsr_Tok.oa: iparith.inc mpsr_Tok.cc 834 $(CXX P) ${CXXFLAGAT} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFSA} -c mpsr_Tok.cc -o mpsr_Tok.oa834 $(CXX) ${CXXFLAGAT} ${CXXTEMPLFLAGSB} ${CPPFLAGS} ${DEFSA} -c mpsr_Tok.cc -o mpsr_Tok.oa 835 835 836 836 # -
Singular/hilb.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: hilb.cc,v 1.1 7 2000-12-12 08:44:44obachman Exp $ */4 /* $Id: hilb.cc,v 1.18 2000-12-14 16:38:48 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - Hilbert series … … 222 222 return hseries1; 223 223 } 224 224 225 if (wdegree == NULL) 225 { 226 // hWeight(); 227 } 226 hWeight(); 228 227 else 229 228 hWDegree(wdegree); 229 230 230 p0 = (int *)omAllocBin(int_bin); 231 231 *p0 = 1; -
Singular/ideals.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.11 7 2000-12-12 08:44:44obachman Exp $ */4 /* $Id: ideals.cc,v 1.118 2000-12-14 16:38:48 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - all basic methods to manipulate ideals … … 2285 2285 for (j=0;j<pVariables;j++) 2286 2286 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; 2288 2290 2289 2291 // fill in tmp ring to get back the data later on … … 2326 2328 } 2327 2329 } 2328 rChangeCurrRing(&tmpR); 2329 idDelete(&hh); 2330 rChangeCurrRing(origR); 2330 id_Delete(&hh, &tmpR); 2331 2331 idSkipZeroes(h3); 2332 2332 omFree((ADDRESS)wv[0]); -
Singular/kInline.cc
rd84b58 r48aa42 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: kInline.cc,v 1.1 8 2000-11-28 11:50:51obachman Exp $9 * Version: $Id: kInline.cc,v 1.19 2000-12-14 16:38:49 obachman Exp $ 10 10 *******************************************************************/ 11 11 #ifndef KINLINE_CC … … 533 533 } 534 534 535 KINLINE 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 535 561 KINLINE poly sLObject::CanonicalizeP() 536 562 { … … 548 574 } 549 575 576 KINLINE 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 550 592 KINLINE poly sLObject::GetP(omBin lmBin = NULL) 551 593 { … … 871 913 /*************************************************************** 872 914 * 915 * Misc things 916 * 917 ***************************************************************/ 918 KINLINE 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 * 873 938 * Routines for backwards-Compatibility 874 939 * … … 919 984 } 920 985 986 921 987 #endif // defined(KINLINE) || defined(KUTIL_CC) 922 988 #endif // KINLINE_CC -
Singular/kspoly.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kspoly.cc,v 1.2 2 2000-11-28 11:50:52obachman Exp $ */4 /* $Id: kspoly.cc,v 1.23 2000-12-14 16:38:50 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - Routines for Spoly creation and reductions … … 209 209 } 210 210 211 //////////////////////////////////////////////////////////////////////////212 // Reduces PR at Current->next with PW213 // Assumes PR != NULL, Current contained in PR214 // Current->next != NULL, LM(PW) devides LM(Current->next)215 // Changes: PR216 // Const: PW217 211 int ksReducePolyTail(LObject* PR, TObject* PW, poly Current, poly spNoether) 218 212 { 219 213 BOOLEAN ret; 214 number coef; 220 215 poly Lp = PR->GetLmCurrRing(); 221 216 poly Save = PW->GetLmCurrRing(); … … 230 225 LObject Red(pNext(Current), PR->tailRing); 231 226 TObject With(PW, Lp == Save); 232 number coef;233 227 234 228 pAssume(!pHaveCommonMonoms(Red.p, With.p)); -
Singular/kstd1.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd1.cc,v 1. 69 2000-12-12 08:44:45obachman Exp $ */4 /* $Id: kstd1.cc,v 1.70 2000-12-14 16:38:50 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: 7 7 */ 8 8 9 // define if LDEG should not be used in inner reduction loops10 // #define NO_LDEG11 12 9 // define if buckets should be used 13 //#define MORA_USE_BUCKETS10 #define MORA_USE_BUCKETS 14 11 15 12 // define if tailrings should be used … … 43 40 |Sy_bit(OPT_INTERRUPT) /* 4 */ 44 41 |Sy_bit(OPT_SUGARCRIT) /* 5 */ 42 |Sy_bit(OPT_REDTHROUGH) 45 43 |Sy_bit(OPT_FASTHC) /* 10 */ 46 44 |Sy_bit(OPT_KEEPVARS) /* 21 */ … … 58 56 |Sy_bit(5) 59 57 |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) 61 60 // |Sy_bit(8) obachman 11/00 tossed 62 61 |Sy_bit(9) … … 402 401 if (!strat->homog) 403 402 { 404 #if def NO_LDEG403 #ifndef HAVE_OLD_STD 405 404 if (strat->honey) 406 405 { … … 909 908 if (BTEST1(27)) 910 909 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); 916 912 updateT(strat); 917 913 strat->posInT = posInT2; … … 1530 1526 long kModDeg(poly p, ring r) 1531 1527 { 1532 // Hmm obachman: on 1-2, this is pTotalDegree 1533 // I think that I had changed this to pWDegree sometime in 10/20001534 // 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 1537 1533 long i=p_GetComp(p, r); 1538 1534 if (i==0) return o; … … 1560 1556 kStrategy strat=new skStrategy; 1561 1557 1558 #ifdef HAVE_OLD_STD 1559 test &= ~Sy_bit(OPT_REDTHROUGH); 1560 #endif 1561 1562 1562 if(!TEST_OPT_RETURN_SB) 1563 1563 strat->syzComp = syzComp; … … 1596 1596 if (h==isHomog) 1597 1597 { 1598 if ( (w!=NULL) && (*w!=NULL))1598 if (strat->ak > 0 && (w!=NULL) && (*w!=NULL)) 1599 1599 { 1600 1600 strat->kModW = kModW = *w; … … 1689 1689 if (h==isHomog) 1690 1690 { 1691 if ( (w!=NULL) && (*w!=NULL))1691 if (strat->ak > 0 && (w!=NULL) && (*w!=NULL)) 1692 1692 { 1693 1693 kModW = *w; -
Singular/kstd2.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1.6 6 2000-12-12 08:44:46obachman Exp $ */4 /* $Id: kstd2.cc,v 1.67 2000-12-14 16:38:51 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 214 214 if (TEST_OPT_DEBUG) Print(" ->L[%d]\n",at); 215 215 #endif 216 h->CanonicalizeP();217 216 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 218 217 h->Clear(); … … 283 282 * end of search: have to reduce with pi 284 283 */ 285 if ( (pass!=0) && (ei > h->ecart))284 if (!TEST_OPT_REDTHROUGH && (pass!=0) && (ei > h->ecart)) 286 285 { 287 286 h->SetLmCurrRing(); … … 353 352 pass++; 354 353 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))) 356 355 { 357 356 h->SetLmCurrRing(); … … 498 497 int olddeg,reduc; 499 498 int hilbeledeg=1,hilbcount=0,minimcnt=0; 500 #ifdef PROT_LENGTH 501 int length; 502 #endif 503 499 BOOLEAN withT = FALSE; 500 504 501 initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/ 505 502 initBuchMoraPos(strat); … … 515 512 strat->use_buckets = 1; 516 513 514 // redtailBBa against T for inhomogenous input 515 #ifndef HAVE_OLD_STD 516 withT = ! strat->homog; 517 #endif 518 517 519 kTest_TS(strat); 518 520 … … 598 600 if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL)) 599 601 { 600 strat->P.p = redtailBba(&(strat->P),pos-1,strat );602 strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT); 601 603 strat->P.pCleardenom(); 602 604 } … … 606 608 strat->P.pNorm(); 607 609 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); 609 611 } 610 612 … … 635 637 636 638 // enter into S, L, and T 637 #ifdef PROT_LENGTH638 if (TEST_OPT_PROT)639 {640 length += strat->P.GetpLength();641 Print("[%d:%d]", strat->P.GetpLength(), length);642 }643 #endif644 639 enterT(strat->P, strat); 645 640 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); -
Singular/kutil.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.8 2 2000-12-12 08:44:46obachman Exp $ */4 /* $Id: kutil.cc,v 1.83 2000-12-14 16:38:51 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 28 28 // system memmove -- it does not seem to pay off, though 29 29 // #define ENTER_USE_MYMEMMOVE 30 31 // define if redtailBba should use buckets 32 #define HAVE_REDTAIL_BUCKETS 30 33 31 34 #include "tok.h" … … 2657 2660 } 2658 2661 2659 // #define OLD_RED_TAIL2660 #ifdef OLD_RED_TAIL2661 /*22662 * reduces h using the set S2663 * procedure used in redtail2664 */2665 /*22666 *compute the normalform of the tail p->next of p2667 *with respect to S2668 */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); // !=NULL2678 int op = pFDeg(hn);2679 BOOLEAN save_HE=strat->kHEdgeFound;2680 strat->kHEdgeFound |= ((Kstd1_deg>0) && (op<=Kstd1_deg))2681 || TEST_OPT_INFREDTAIL;2682 loop2683 {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 else2704 {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 #else2720 2662 poly redtail (poly p, int pos, kStrategy strat) 2721 2663 { … … 2723 2665 return redtail(&L, pos, strat); 2724 2666 } 2667 2668 2669 #ifndef OLD_REDTAIL_BBA 2670 poly 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); 2725 2691 #endif 2726 2692 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 2744 poly redtailBba (LObject* L, int pos, kStrategy strat, BOOLEAN withT) 2728 2745 { 2729 2746 poly h, hn; … … 2747 2764 Ln.Set(hn, strat->tailRing); 2748 2765 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 } 2751 2777 if (ksReducePolyTail(L, With, h, strat->kNoether)) 2752 2778 { … … 2780 2806 return p; 2781 2807 } 2782 2808 #endif 2783 2809 /*2 2784 2810 *checks the change degree and write progress report -
Singular/kutil.h
rd84b58 r48aa42 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kutil.h,v 1.4 6 2000-11-28 11:50:54obachman Exp $ */6 /* $Id: kutil.h,v 1.47 2000-12-14 16:38:52 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT: kernel: utils for kStd … … 20 20 #define setmax 16 21 21 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 23 26 #undef NO_KINLINE 24 27 #if !defined(KDEBUG) && !defined(NO_INLINE) … … 133 136 // Iterations 134 137 KINLINE void LmDeleteAndIter(); 138 KINLINE poly LmExtractAndIter(); 135 139 136 140 // spoly related things … … 143 147 // deletes bucket, makes sure that p and t_p exists 144 148 KINLINE poly GetP(omBin lmBin = NULL); 149 // similar, except that only t_p exists 150 KINLINE poly GetTP(); 151 145 152 // does not delete bucket, just canonicalizes it 146 153 // returned poly is such that Lm(p) \in currRing, Tail(p) \in tailRing … … 303 310 LObject* L,const kStrategy strat); 304 311 KINLINE poly redtailBba (poly p,int pos,kStrategy strat); 305 poly redtailBba (LObject *L, int pos,kStrategy strat );312 poly redtailBba (LObject *L, int pos,kStrategy strat, BOOLEAN withT = FALSE); 306 313 poly redtail (poly p,int pos,kStrategy strat); 307 314 poly redtail (LObject *L,int pos,kStrategy strat); … … 440 447 poly spNoether = NULL); 441 448 449 KINLINE int ksReducePolyTail(LObject* PR, TObject* PW, LObject* Red); 450 442 451 // Creates S-Poly of Pair 443 452 // Const: Pair->p1, Pair->p2 … … 447 456 int use_buckets=0, ring tailRing=currRing, 448 457 poly m1 = NULL, poly m2 = NULL, TObject** R = NULL); 449 450 458 451 459 /*2 -
Singular/misc.cc
rd84b58 r48aa42 325 325 /* 25 no redTail(p)/redTail(s) */ 326 326 {"redTail", Sy_bit(OPT_REDTAIL), ~Sy_bit(OPT_REDTAIL) }, 327 {"redThrough", Sy_bit(OPT_REDTHROUGH), ~Sy_bit(OPT_REDTHROUGH) }, 327 328 {"intStrategy", Sy_bit(OPT_INTSTRATEGY), ~Sy_bit(OPT_INTSTRATEGY) }, 328 329 {"infRedTail", Sy_bit(OPT_INFREDTAIL), ~Sy_bit(OPT_INFREDTAIL) }, -
Singular/p_polys.cc
rd84b58 r48aa42 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: p_polys.cc,v 1.1 2 2000-11-24 16:24:43 SingularExp $9 * Version: $Id: p_polys.cc,v 1.13 2000-12-14 16:38:53 obachman Exp $ 10 10 *******************************************************************/ 11 11 … … 243 243 case ringorder_Dp: 244 244 case ringorder_Ds: 245 case ringorder_rp: 245 246 for (k=r->block0[i];k<=r->block1[i];k++) 246 247 { … … 252 253 case ringorder_S: 253 254 case ringorder_s: 255 case ringorder_aa: 254 256 break; 255 257 case ringorder_a: -
Singular/polys.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1.7 0 2000-12-01 14:07:49 SingularExp $ */4 /* $Id: polys.cc,v 1.71 2000-12-14 16:38:53 obachman Exp $ */ 5 5 6 6 /* … … 60 60 if ((r->LexOrder) || (r->OrdSgn==-1)) 61 61 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); 62 67 } 63 68 } -
Singular/ring.cc
rd84b58 r48aa42 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.1 49 2000-12-12 08:44:51obachman Exp $ */4 /* $Id: ring.cc,v 1.150 2000-12-14 16:38:54 obachman Exp $ */ 5 5 6 6 /* … … 53 53 "Ws", //ringorder_Ws, 54 54 "L", //ringorder_L, 55 "aa", //ringorder_aa 55 56 " _" //ringorder_unspec 56 57 }; … … 358 359 if (rCheckIV(iv)) return TRUE; 359 360 break; 361 case ringorder_aa: 360 362 case ringorder_a: 361 363 R->block0[n] = last+1; … … 747 749 if ((r->order[l] >= ringorder_lp) 748 750 ||(r->order[l] == ringorder_M) 749 ||(r->order[l] == ringorder_a)) 751 ||(r->order[l] == ringorder_a) 752 ||(r->order[l] == ringorder_aa)) 750 753 { 751 754 PrintS("\n// : names "); … … 1972 1975 } 1973 1976 1977 BOOLEAN 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 1974 1985 // return TRUE if p->exp[r->pOrdIndex] holds total degree of p */ 1975 1986 BOOLEAN rOrd_is_Totaldegree_Ordering(ring r =currRing) … … 1977 1988 // Hmm.... what about Syz orderings? 1978 1989 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]))))); 1982 1996 } 1983 1997 … … 2658 2672 case ringorder_rp: 2659 2673 case ringorder_a: 2674 case ringorder_aa: 2660 2675 if (r->OrdSgn==-1) r->MixedOrder=TRUE; 2661 2676 break; … … 2682 2697 } 2683 2698 2699 static 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 2684 2709 // set pFDeg, pLDeg, MixOrder, ComponentOrder, etc 2685 2710 static void rSetDegStuff(ring r) … … 2756 2781 if ((r->VectorOut)||(order[0]==ringorder_C)||(order[0]==ringorder_S)||(order[0]==ringorder_s)) 2757 2782 { 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); 2761 2784 } 2762 2785 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 2768 2788 /*the number of orderings:*/ 2769 2789 int i = 0; … … 2855 2875 for(i=0;i<n;i++) 2856 2876 { 2877 tmp_typ[typ_i].order_index=i; 2857 2878 switch (r->order[i]) 2858 2879 { 2859 2880 case ringorder_a: 2881 case ringorder_aa: 2860 2882 rO_WDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,tmp_typ[typ_i], 2861 2883 r->wvhdl[i]); … … 3113 3135 if (i==r->pCompIndex) i++; 3114 3136 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))) 3116 3140 { 3117 3141 i++; j++; -
Singular/ring.h
rd84b58 r48aa42 7 7 * ABSTRACT - the interpreter related ring operations 8 8 */ 9 /* $Id: ring.h,v 1.6 0 2000-12-06 11:03:29 SingularExp $ */9 /* $Id: ring.h,v 1.61 2000-12-14 16:38:55 obachman Exp $ */ 10 10 11 11 /* includes */ … … 184 184 ringorder_Ws, 185 185 ringorder_L, 186 // the following are only used internally 187 ringorder_aa, // for idElimination, like a, except pFDeg, pWeigths ignore it 186 188 ringorder_unspec 187 189 } rRingOrder_t; -
Singular/structs.h
rd84b58 r48aa42 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1.4 7 2000-12-13 17:49:40 SingularExp $ */6 /* $Id: structs.h,v 1.48 2000-12-14 16:38:55 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 318 318 { 319 319 ro_typ ord_typ; 320 int order_index; // comes from r->order[order_index] 320 321 union 321 322 { -
Singular/tok.h
rd84b58 r48aa42 7 7 * ABSTRACT: tokens, types for interpreter; general macros 8 8 */ 9 /* $Id: tok.h,v 1.4 6 2000-12-13 17:49:40 SingularExp $ */9 /* $Id: tok.h,v 1.47 2000-12-14 16:38:55 obachman Exp $ */ 10 10 11 11 #ifndef MYYSTYPE … … 188 188 #define OPT_SUGARCRIT 5 189 189 #define OPT_DEBUG 6 190 #define OPT_REDTHROUGH 7 190 191 #define OPT_RETURN_SB 9 191 192 #define OPT_FASTHC 10 … … 219 220 #define TEST_OPT_NOTREGULARITY BTEST1(OPT_NOTREGULARITY) 220 221 #define TEST_OPT_WEIGHTM BTEST1(OPT_WEIGHTM) 222 #define TEST_OPT_REDTHROUGH BTEST1(OPT_REDTHROUGH) 221 223 222 224 #define TEST_VERB_NSB BVERBOSE(V_NSB)
Note: See TracChangeset
for help on using the changeset viewer.