Changeset 0ffc823 in git for kernel/ratgring.cc
- Timestamp:
- Feb 27, 2009, 8:30:47 PM (15 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- 8066e80d7cea5de772f7b10b2b1930521cb72523
- Parents:
- f58aa61ada5934435d94d1d486fb70912543c11a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.