- Timestamp:
- Apr 23, 2013, 5:00:16 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 5782e2d7947412c3820f7bd158d09b128c888ca9
- Parents:
- 888b45777bfde99aa51caf2645601ffcc66fa35e
- Location:
- libpolys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
r888b457 rb56249 139 139 void (*cfMPZ)(mpz_t result, number &n, const coeffs r); 140 140 141 #ifdef HAVE_RINGS142 int (*cfDivComp)(number a,number b,const coeffs r);143 BOOLEAN (*cfIsUnit)(number a,const coeffs r);144 number (*cfGetUnit)(number a,const coeffs r);145 #endif146 147 141 /// changes argument inline: a:= -a 148 142 /// return -a! (no copy is returned) … … 165 159 const char * (*cfRead)(const char * s, number * a, const coeffs r); 166 160 void (*cfNormalize)(number &a, const coeffs r); 161 162 #ifdef HAVE_RINGS 163 int (*cfDivComp)(number a,number b,const coeffs r); 164 BOOLEAN (*cfIsUnit)(number a,const coeffs r); 165 number (*cfGetUnit)(number a,const coeffs r); 166 BOOLEAN (*cfDivBy)(number a, number b, const coeffs r); 167 #endif 168 169 167 170 BOOLEAN (*cfGreater)(number a,number b, const coeffs r), 168 #ifdef HAVE_RINGS169 (*cfDivBy)(number a, number b, const coeffs r),170 #endif171 171 /// tests 172 172 (*cfEqual)(number a,number b, const coeffs r), … … 428 428 429 429 #ifdef HAVE_RINGS 430 static inline int n_DivComp(number a, number b, const coeffs r) 431 { assume(r != NULL); assume(r->cfDivComp!=NULL); return r->cfDivComp (a,b,r); } 432 430 433 /// TRUE iff n has a multiplicative inverse in the given coeff field/ring r 431 434 static inline BOOLEAN n_IsUnit(number n, const coeffs r) 432 435 { assume(r != NULL); assume(r->cfIsUnit!=NULL); return r->cfIsUnit(n,r); } 433 434 static inline number n_ExtGcd(number a, number b, number *s, number *t, const coeffs r)435 { assume(r != NULL); assume(r->cfExtGcd!=NULL); return r->cfExtGcd (a,b,s,t,r); }436 437 static inline int n_DivComp(number a, number b, const coeffs r)438 { assume(r != NULL); assume(r->cfDivComp!=NULL); return r->cfDivComp (a,b,r); }439 436 440 437 /// in Z: 1 … … 577 574 { assume(r != NULL); assume(r->cfGcd!=NULL); return r->cfGcd(a,b,r); } 578 575 576 /// beware that ExtGCD is only relevant for a few chosen coeff. domains 577 /// and may perform something unexpected in some cases... 578 static inline number n_ExtGcd(number a, number b, number *s, number *t, const coeffs r) 579 { assume(r != NULL); assume(r->cfExtGcd!=NULL); return r->cfExtGcd (a,b,s,t,r); } 580 579 581 /// in Z: return the lcm of 'a' and 'b' 580 582 /// in Z/nZ, Z/2^kZ: computed as in the case Z … … 819 821 // Missing wrappers for: (TODO: review this?) 820 822 // cfIntMod, cfRead, cfName, cfInit_bigint 821 // HAVE_RINGS: cfDivComp, cfExtGcd... 823 824 // HAVE_RINGS: cfDivComp, cfIsUnit, cfGetUnit, cfDivBy 825 // BUT NOT cfExtGcd...! 822 826 823 827 -
libpolys/polys/nc/gb_hack.h
r888b457 rb56249 6 6 #ifdef PLURAL_INTERNAL_DECLARATIONS 7 7 8 struct spolyrec; 9 typedef struct spolyrec polyrec; 10 typedef polyrec * poly; 11 12 struct ip_sring; 13 typedef struct ip_sring * ring; 8 struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec * poly; 9 struct ip_sring; typedef struct ip_sring * ring; 10 struct sip_sideal; typedef struct sip_sideal * ideal; 14 11 15 12 class intvec; 16 17 struct sip_sideal;18 typedef struct sip_sideal * ideal;19 13 20 14 class skStrategy; typedef skStrategy * kStrategy; -
libpolys/polys/prCopy.h
r888b457 rb56249 8 8 */ 9 9 10 struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly; 11 struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring; 12 struct sip_sideal; typedef struct sip_sideal *ideal; 10 13 11 14 /*************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.