Changeset 48a41a in git
- Timestamp:
- Feb 17, 2012, 11:35:47 AM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 26acab557e4ad73e2c8ba02fa1ad998773365fff66e25f2bbb3969a1769c9710fee12d7ca6262dd7
- Parents:
- 46eef0a30be9c81870e8f7f971a5e0748c9e8fcd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r46eef0 r48a41a 4445 4445 static BOOLEAN jjPARDEG(leftv res, leftv v) 4446 4446 { 4447 res->data = (char *)0L;4448 4447 number nn=(number)v->Data(); 4449 if (nn!=NULL) 4450 { 4451 if (getCoeffType(currRing->cf)==n_algExt) 4452 { 4453 poly qq=(poly)nn; 4454 res->data = (char *)(long)currRing->cf->extRing->pFDeg(qq, 4455 currRing->cf->extRing); 4456 } 4457 if(getCoeffType(currRing->cf)==n_transExt) 4458 { 4459 /* from transext.h:*/ 4460 struct fractionObject 4461 { 4462 poly numerator; 4463 poly denominator; 4464 int complexity; 4465 }; 4466 typedef struct fractionObject * fraction; 4467 #define NUM(f) (((fraction)f)->numerator) 4468 4469 fraction qq=(fraction)nn; 4470 res->data = (char *)(long)currRing->cf->extRing->pFDeg(NUM(qq), 4471 currRing->cf->extRing); 4472 } 4473 } 4448 res->data = (char *)(long)n_ParDeg(nn,currRing->cf); 4474 4449 return FALSE; 4475 4450 } -
libpolys/coeffs/coeffs.h
r46eef0 r48a41a 183 183 /// returns X with X mod q[i]=x[i], i=0..rl-1 184 184 number (*cfChineseRemainder)(number *x, number *q,int rl, const coeffs); 185 186 /// degree for coeffcients: -1 for 0, 0 for "constants", ... 187 int (*cfParDeg)(number x,const coeffs r); 185 188 186 189 #ifdef HAVE_FACTORY … … 610 613 } 611 614 615 static inline int n_ParDeg(number n, const coeffs r) 616 { 617 assume(r != NULL); 618 return r->cfParDeg(n,r); 619 } 620 612 621 static inline number n_Init_bigint(number i, const coeffs dummy, 613 622 const coeffs dst) -
libpolys/coeffs/numbers.cc
r46eef0 r48a41a 85 85 Werror("ChineseRemainder not implemented for (c=%d)",getCoeffType(r)); 86 86 return n_Init(0,r); 87 } 88 89 int ndParDeg(number n, const coeffs r) 90 { 91 return (-n_IsZero(n,r)); 87 92 } 88 93 … … 252 257 n->cfChineseRemainder = ndChineseRemainder; 253 258 n->cfFarey = ndFarey; 259 n->cfParDeg = ndParDeg; 254 260 255 261 #ifdef HAVE_RINGS -
libpolys/polys/ext_fields/algext.cc
r46eef0 r48a41a 737 737 738 738 return NULL; /// default 739 } 740 741 int naParDeg(number a, const coeffs cf) 742 { 743 if (a == NULL) return -1; 744 poly aa=(poly)a; 745 return cf->extRing->pFDeg(aa,cf->extRing); 739 746 } 740 747 … … 810 817 cf->convSingNFactoryN=naConvSingNFactoryN; 811 818 #endif 819 cf->cfParDeg = naParDeg; 812 820 813 821 return FALSE; -
libpolys/polys/ext_fields/transext.cc
r46eef0 r48a41a 1281 1281 #endif 1282 1282 1283 int ntParDeg(number a, const coeffs cf) 1284 { 1285 if (IS0(a)) return -1; 1286 fraction fa = (fraction)a; 1287 return cf->extRing->pFDeg(NUM(fa),cf->extRing); 1288 } 1289 1283 1290 BOOLEAN ntInitChar(coeffs cf, void * infoStruct) 1284 1291 { … … 1349 1356 cf->convSingNFactoryN =ntConvSingNFactoryN; 1350 1357 #endif 1358 cf->cfParDeg = ntParDeg; 1351 1359 1352 1360 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.