- Timestamp:
- Mar 15, 2011, 3:45:13 PM (13 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 91b031a4e88cb480f4ba993bf5904694c62d9b34
- Parents:
- c4dab43d69dd36ed09ba07d4e771236f8a7bcc39
- Location:
- kernel
- Files:
-
- 4 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 } -
kernel/ideals.h
rc4dab4 rdd5534 62 62 /*- initialise the maximal ideal (at 0) -*/ 63 63 void idSkipZeroes (ideal ide); 64 /* index of generator with leading term in ground ring (if any); 65 otherwise -1 */ 66 int idPosConstant (ideal id); 64 67 /*gives an ideal the minimal possible size*/ 65 68 void idNorm(ideal id); -
kernel/pInline1.h
rc4dab4 rdd5534 587 587 { 588 588 if (p == NULL) return FALSE; 589 #ifdef HAVE_RINGS 590 if (rField_is_Ring(currRing)) 591 return (p_LmIsConstant(p, r) && nIsUnit(pGetCoeff(p))); 592 #endif 589 593 return p_LmIsConstant(p, r); 590 594 } -
kernel/polys1.cc
rc4dab4 rdd5534 1717 1717 if (pLength(p1) != pLength(p2)) 1718 1718 return FALSE; 1719 #ifdef HAVE_RINGS 1720 if (rField_is_Ring(currRing)) 1721 { 1722 if ((pLength(p1) == 1) && (nEqual(pGetCoeff(p1), pGetCoeff(p2)))) 1723 return TRUE; 1724 if (!nIsUnit(pGetCoeff(p2))) return FALSE; 1725 } 1726 #endif 1719 1727 n=nDiv(pGetCoeff(p1),pGetCoeff(p2)); 1720 1728 while ((p1 != NULL) /*&& (p2 != NULL)*/)
Note: See TracChangeset
for help on using the changeset viewer.