Changeset 107986 in git for kernel/polys.cc
 Timestamp:
 Jul 25, 2008, 4:37:55 PM (15 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 356960f1a09d63bc25ab2b04269bb1f6ce67fd28
 Parents:
 7a6c062bb1546ba06ab19b759243b02e83b52197
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/polys.cc
r7a6c06 r107986 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1.3 3 20080715 15:29:15 wienandExp $ */4 /* $Id: polys.cc,v 1.34 20080725 14:37:55 Singular Exp $ */ 5 5 6 6 /* … … 209 209 * convert monomial given as string to poly, e.g. 1x3y5z 210 210 */ 211 const char * p_Read(const char *st, poly &rc, ring r)211 const char * p_Read(const char *st, poly &rc, const ring r) 212 212 { 213 213 if (r==NULL) { rc=NULL;return st;} … … 782 782 *normalize all coefficients 783 783 */ 784 void p_Normalize(poly p, ring r)784 void p_Normalize(poly p,const ring r) 785 785 { 786 786 if (rField_has_simple_inverse(r)) return; /* Z/p, GF(p,n), R, long R/C */ … … 1041 1041 return FALSE; 1042 1042 } 1043 BOOLEAN pCompareChainPart (poly p,poly p1,poly p2,poly lcm) 1044 { 1045 int k, j; 1046 1047 if (lcm==NULL) return FALSE; 1048 1049 for (j=currRing>real_var_end; j>=currRing>real_var_start; j) 1050 if ( pGetExp(p,j) > pGetExp(lcm,j)) return FALSE; 1051 if ( pGetComp(p) != pGetComp(lcm)) return FALSE; 1052 for (j=currRing>real_var_end; j>=currRing>real_var_start; j) 1053 { 1054 if (pGetExp(p1,j)!=pGetExp(lcm,j)) 1055 { 1056 if (pGetExp(p,j)!=pGetExp(lcm,j)) 1057 { 1058 for (k=pVariables; k>j; k) 1059 for (k=currRing>real_var_end; k>j; k) 1060 { 1061 if ((pGetExp(p,k)!=pGetExp(lcm,k)) 1062 && (pGetExp(p2,k)!=pGetExp(lcm,k))) 1063 return TRUE; 1064 } 1065 for (k=j1; k>=currRing>real_var_start; k) 1066 { 1067 if ((pGetExp(p,k)!=pGetExp(lcm,k)) 1068 && (pGetExp(p2,k)!=pGetExp(lcm,k))) 1069 return TRUE; 1070 } 1071 return FALSE; 1072 } 1073 } 1074 else if (pGetExp(p2,j)!=pGetExp(lcm,j)) 1075 { 1076 if (pGetExp(p,j)!=pGetExp(lcm,j)) 1077 { 1078 for (k=currRing>real_var_end; k>j; k) 1079 { 1080 if ((pGetExp(p,k)!=pGetExp(lcm,k)) 1081 && (pGetExp(p1,k)!=pGetExp(lcm,k))) 1082 return TRUE; 1083 } 1084 for (k=j1; k>=currRing>real_var_start; k) 1085 { 1086 if ((pGetExp(p,k)!=pGetExp(lcm,k)) 1087 && (pGetExp(p1,k)!=pGetExp(lcm,k))) 1088 return TRUE; 1089 } 1090 return FALSE; 1091 } 1092 } 1093 } 1094 return FALSE; 1095 } 1043 1096 1044 1097 int pSize(poly p)
Note: See TracChangeset
for help on using the changeset viewer.