Changeset 4bbe3b in git for kernel/gr_kstd2.cc
- Timestamp:
- Dec 8, 2003, 6:31:02 PM (19 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 76b84f5bfd7c384f5c7a94ccf6a2de3f89981093
- Parents:
- c14061bb051b9d471f072e6f16e14485a8bd0f5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
rc14061 r4bbe3b 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1. 1.1.1 2003-10-06 12:15:53Singular Exp $ */4 /* $Id: gr_kstd2.cc,v 1.2 2003-12-08 17:31:01 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: noncomm. alg. of Buchberger … … 19 19 #include "cntrlc.h" 20 20 #include "weight.h" 21 #include "ipid.h"22 #include "ipshell.h"23 21 #include "intvec.h" 24 #include " tok.h"22 #include "structs.h" 25 23 #include "gring.h" 26 24 … … 77 75 wrp(strat->S[j]); 78 76 } 79 (*h).p = nc_ spGSpolyRed(strat->S[j],(*h).p, NULL, currRing);77 (*h).p = nc_ReduceSpoly(strat->S[j],(*h).p, NULL, currRing); 80 78 //spSpolyRed(strat->T[j].p,(*h).p,strat->kNoether); 81 79 … … 152 150 * and the case of a degree-ordering 153 151 */ 154 static int redHomog (LObject* h,kStrategy strat)152 static int nc_redHomog (LObject* h,kStrategy strat) 155 153 { 156 154 if (strat->tl<0) … … 179 177 } 180 178 /*- compute the s-polynomial -*/ 181 (*h).p = nc_ spGSpolyRed(strat->S[j],(*h).p,strat->kNoether,currRing);179 (*h).p = nc_ReduceSpoly(strat->S[j],(*h).p,strat->kNoether,currRing); 182 180 if ((*h).p == NULL) 183 181 { … … 216 214 * and the case of a degree-ordering 217 215 */ 218 static int redHomog0 (LObject* h,kStrategy strat)216 static int nc_redHomog0 (LObject* h,kStrategy strat) 219 217 { 220 218 if (strat->tl<0) … … 244 242 } 245 243 /*- compute the s-polynomial -*/ 246 (*h).p = nc_ spGSpolyRed(strat->T[j].p,(*h).p,strat->kNoether,currRing);244 (*h).p = nc_ReduceSpoly(strat->T[j].p,(*h).p,strat->kNoether,currRing); 247 245 if ((*h).p == NULL) 248 246 { … … 289 287 * and not a degree-ordering 290 288 */ 291 static int redLazy (LObject* h,kStrategy strat)289 static int nc_redLazy (LObject* h,kStrategy strat) 292 290 { 293 291 if (strat->tl<0) … … 319 317 } 320 318 /*- compute the s-polynomial -*/ 321 (*h).p = nc_ spGSpolyRed(strat->S[j],(*h).p,strat->kNoether,currRing);319 (*h).p = nc_ReduceSpoly(strat->S[j],(*h).p,strat->kNoether,currRing); 322 320 if ((*h).p == NULL) 323 321 { … … 399 397 * element in T with respect to the given ecart 400 398 */ 401 static int redHoney (LObject* h,kStrategy strat)399 static int nc_redHoney (LObject* h,kStrategy strat) 402 400 { 403 401 if (strat->tl<0) … … 482 480 { 483 481 strat->fromT=FALSE; 484 (*h).p = nc_ spGSpolyRedNew(pi,(*h).p,strat->kNoether,currRing);482 (*h).p = nc_ReduceSpolyNew(pi,(*h).p,strat->kNoether,currRing); 485 483 } 486 484 else 487 (*h).p = nc_ spGSpolyRed(pi,(*h).p,strat->kNoether,currRing);485 (*h).p = nc_ReduceSpoly(pi,(*h).p,strat->kNoether,currRing); 488 486 if (TEST_OPT_DEBUG) 489 487 { … … 576 574 * reduces with elements from T and chooses the best possible 577 575 */ 578 static int redBest (LObject* h,kStrategy strat)576 static int nc_redBest (LObject* h,kStrategy strat) 579 577 { 580 578 if (strat->tl<0) … … 607 605 else 608 606 #endif 609 p = nc_ spShort(strat->T[j].p,(*h).p);607 p = nc_CreateShortSpoly(strat->T[j].p,(*h).p); 610 608 /* computes only the first monomial of the spoly */ 611 609 if (p) … … 631 629 else 632 630 #endif 633 ph = nc_ spShort(strat->T[j].p,(*h).p);631 ph = nc_CreateShortSpoly(strat->T[j].p,(*h).p); 634 632 if (ph==NULL) 635 633 { … … 657 655 } 658 656 pLmFree(p); 659 (*h).p = nc_ spGSpolyRed(strat->T[jbest].p,(*h).p,strat->kNoether,currRing);657 (*h).p = nc_ReduceSpoly(strat->T[jbest].p,(*h).p,strat->kNoether,currRing); 660 658 } 661 659 else … … 734 732 strat->enterS = enterSBba; 735 733 if ((BTEST1(20)) && (!strat->honey)) 736 strat->red = redBest;734 strat->red = nc_redBest; 737 735 else if (strat->honey) 738 strat->red = redHoney;736 strat->red = nc_redHoney; 739 737 else if (pLexOrder && !strat->homog) 740 strat->red = redLazy;738 strat->red = nc_redLazy; 741 739 else if (TEST_OPT_INTSTRATEGY && strat->homog) 742 strat->red = redHomog0;740 strat->red = nc_redHomog0; 743 741 else 744 strat->red = redHomog;742 strat->red = nc_redHomog; 745 743 if (rIsPluralRing(currRing)) 746 744 { … … 761 759 if ((TEST_OPT_WEIGHTM)&&(F!=NULL)) 762 760 { 763 //interred machen Aenderung764 pFDegOld=pFDeg;765 pLDegOld=pLDeg;766 h=ggetid("ecart");767 if ((h!=NULL) && (IDTYP(h)==INTVEC_CMD))768 {769 ecartWeights=iv2array(IDINTVEC(h));770 }771 else761 //interred machen Aenderung 762 pFDegOld=pFDeg; 763 pLDegOld=pLDeg; 764 // h=ggetid("ecart"); 765 // if ((h!=NULL) && (IDTYP(h)==INTVEC_CMD)) 766 // { 767 // ecartWeights=iv2array(IDINTVEC(h)); 768 // } 769 // else 772 770 { 773 771 ecartWeights=(short *)omAlloc((pVariables+1)*sizeof(short)); … … 833 831 { 834 832 strat->cp++; 835 /* prod.crit itself in nc_ spGSpolyCreate*/836 } 837 strat->P.p = nc_ spGSpolyCreate(strat->P.p1,strat->P.p2,strat->kNoether,currRing);833 /* prod.crit itself in nc_CreateSpoly */ 834 } 835 strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,strat->kNoether,currRing); 838 836 } 839 837 if (strat->P.p != NULL)
Note: See TracChangeset
for help on using the changeset viewer.