Changeset 0ffc823 in git
- Timestamp:
- Feb 27, 2009, 8:30:47 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 8066e80d7cea5de772f7b10b2b1930521cb72523
- Parents:
- f58aa61ada5934435d94d1d486fb70912543c11a
- Location:
- kernel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
rf58aa6 r0ffc823 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1.3 5 2009-02-27 16:56:51levandov Exp $ */4 /* $Id: gr_kstd2.cc,v 1.36 2009-02-27 19:30:47 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: noncomm. alg. of Buchberger … … 1190 1190 /* enter P.p into s and L */ 1191 1191 { 1192 /* quick unit detection in the rational case */ 1193 #ifdef HAVE_RATGRING 1194 if( rIsRatGRing(currRing) ) 1195 { 1196 if ( p_LmIsConstantRat(strat->P.p, currRing) ) 1197 { 1198 #ifdef PDEBUG 1199 Print("unit element detected:"); 1200 p_wrp(strat->P.p,currRing); 1201 #endif 1202 p_Delete(&strat->P.p,currRing, strat->tailRing); 1203 strat->P.p = pOne(); 1204 } 1205 } 1206 #endif 1192 1207 strat->P.sev=0; 1193 1208 int pos=posInS(strat,strat->sl,strat->P.p, strat->P.ecart); -
kernel/polys1.cc
rf58aa6 r0ffc823 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys1.cc,v 1.3 6 2009-02-26 14:30:23 SingularExp $ */4 /* $Id: polys1.cc,v 1.37 2009-02-27 19:30:47 levandov Exp $ */ 5 5 6 6 /* … … 1058 1058 if (rIsRatGRing(currRing)) 1059 1059 { 1060 /* quick unit detection in the rational case is done in gr_nc_bba */ 1060 1061 pContentRat(ph); 1061 1062 start=ph; -
kernel/ratgring.cc
rf58aa6 r0ffc823 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: ratgring.cc,v 1.2 2 2009-02-26 14:24:23 SingularExp $9 * Version: $Id: ratgring.cc,v 1.23 2009-02-27 19:30:47 levandov Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 416 416 } 417 417 418 if ( (p_LmIsConstantRat(p1,r)) || (p_LmIsConstantRat(p2,r)) ) 419 { 420 p_Delete(&p1,r); 421 p_Delete(&p2,r); 422 return( NULL ); 423 } 424 425 418 426 /* note: prod. crit does not apply! */ 419 427 poly pL=pOne(); … … 528 536 return(NULL); 529 537 } 538 539 if (p_LmIsConstantRat(p1,r)) 540 { 541 return( NULL ); 542 } 543 530 544 531 545 int is = ishift; /* TODO */ … … 794 808 omFree(L); 795 809 } 796 #endif 810 811 // test if monomial is a constant, i.e. if all exponents and the component 812 // is zero 813 BOOLEAN p_LmIsConstantRat(const poly p, const ring r) 814 { 815 if (p_LmIsConstantCompRat(p, r)) 816 return (p_GetComp(p, r) == 0); 817 return FALSE; 818 } 819 820 // test if the monomial is a constant as a vector component 821 // i.e., test if all exponents are zero 822 BOOLEAN p_LmIsConstantCompRat(const poly p, const ring r) 823 { 824 int i = r->real_var_end; 825 826 while ( (p_GetExp(p,i,r)==0) && (i>=r->real_var_start)) 827 { 828 i--; 829 } 830 return ( i+1 == r->real_var_start ); 831 } 832 833 #endif -
kernel/ratgring.h
rf58aa6 r0ffc823 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ratgring.h,v 1.1 1 2009-02-26 14:24:32 SingularExp $ */6 /* $Id: ratgring.h,v 1.12 2009-02-27 19:30:47 levandov Exp $ */ 7 7 /* 8 8 * ABSTRACT additional defines etc for --with-plural … … 117 117 void pContentRat(poly &ph); 118 118 119 BOOLEAN p_LmIsConstantRat(const poly p, const ring r); 120 121 BOOLEAN p_LmIsConstantCompRat(const poly p, const ring r); 122 119 123 #endif /* HAVE_PLURAL */ 120 124 #endif
Note: See TracChangeset
for help on using the changeset viewer.