Changeset dd5534 in git for kernel/ideals.cc
- Timestamp:
- Mar 15, 2011, 3:45:13 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 91b031a4e88cb480f4ba993bf5904694c62d9b34
- Parents:
- c4dab43d69dd36ed09ba07d4e771236f8a7bcc39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
rc4dab4 rdd5534 94 94 #endif 95 95 96 /* index of generator with leading term in ground ring (if any); 97 otherwise -1 */ 98 int idPosConstant(ideal id) 99 { 100 int k; 101 for (k = IDELEMS(id)-1; k>=0; k--) 102 { 103 if (p_LmIsConstantComp(id->m[k], currRing) == TRUE) 104 return k; 105 } 106 return -1; 107 } 108 96 109 /*2 97 110 * initialise the maximal ideal (at 0) … … 223 236 224 237 /*2 225 * ideal id = (id[i]), c any number238 * ideal id = (id[i]), c any unit 226 239 * if id[i] = c*id[j] then id[j] is deleted for j > i 227 240 */ … … 236 249 for (j=k; j>i; j--) 237 250 { 238 if ((id->m[j]!=NULL) 239 && (pComparePolys(id->m[i], id->m[j]))) 251 if (id->m[j]!=NULL) 240 252 { 241 pDelete(&id->m[j]); 253 #ifdef HAVE_RINGS 254 if (rField_is_Ring(currRing)) 255 { 256 /* if id[j] = c*id[i] then delete id[j]. 257 In the below cases of a ground field, we 258 check whether id[i] = c*id[j] and, if so, 259 delete id[j] for historical reasons (so 260 that previous output does not change) */ 261 if (pComparePolys(id->m[j], id->m[i])) pDelete(&id->m[j]); 262 } 263 else 264 { 265 if (pComparePolys(id->m[i], id->m[j])) pDelete(&id->m[j]); 266 } 267 #else 268 if (pComparePolys(id->m[i], id->m[j])) pDelete(&id->m[j]); 269 #endif 242 270 } 243 271 }
Note: See TracChangeset
for help on using the changeset viewer.