Changeset 66ce6d in git
- Timestamp:
- Jan 8, 2013, 1:07:50 PM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 2aee667644f2d68561171e8c9ca4258221af3702
- Parents:
- f3057e70e4aa29729c2cb61a6794e057fb4351b7
- git-author:
- Martin Lee <martinlee84@web.de>2013-01-08 13:07:50+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2013-01-17 18:24:09+01:00
- Location:
- libpolys/coeffs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
rf3057e7 r66ce6d 94 94 { 95 95 coeffs next; 96 unsigned int ringtype; /*=0 => coefficient field,96 /*unsigned int ringtype; =0 => coefficient field, 97 97 !=0 => coeffs from one of the rings: 98 98 =1 => Z/2^mZ … … 609 609 // Tests: 610 610 static inline BOOLEAN nCoeff_is_Ring_2toM(const coeffs r) 611 { assume(r != NULL); return ( r->ringtype == 1); }611 { assume(r != NULL); return (getCoeffType(r)==n_Z2m); } 612 612 613 613 static inline BOOLEAN nCoeff_is_Ring_ModN(const coeffs r) 614 { assume(r != NULL); return ( r->ringtype == 2); }614 { assume(r != NULL); return (getCoeffType(r)==n_Zn); } 615 615 616 616 static inline BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r) 617 { assume(r != NULL); return ( r->ringtype == 3); }617 { assume(r != NULL); return (getCoeffType(r)==n_Znm); } 618 618 619 619 static inline BOOLEAN nCoeff_is_Ring_Z(const coeffs r) 620 { assume(r != NULL); return ( r->ringtype == 4); }620 { assume(r != NULL); return (getCoeffType(r)==n_Z); } 621 621 622 622 static inline BOOLEAN nCoeff_is_Ring(const coeffs r) 623 { assume(r != NULL); return ( r->ringtype != 0); }623 { assume(r != NULL); return ((getCoeffType(r)==n_Z) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Znm)); } 624 624 625 625 /// returns TRUE, if r is not a field and r has no zero divisors (i.e is a domain) … … 628 628 assume(r != NULL); 629 629 #ifdef HAVE_RINGS 630 return ( r->ringtype == 4 || r->ringtype == 0);630 return (getCoeffType(r)==n_Z || ((getCoeffType(r)!=n_Z2m) && (getCoeffType(r)!=n_Zn) && (getCoeffType(r)!=n_Znm))); 631 631 #else 632 632 return TRUE; … … 707 707 /// returns TRUE, if r is not a field and r has non-trivial units 708 708 static inline BOOLEAN nCoeff_has_Units(const coeffs r) 709 { assume(r != NULL); return (( r->ringtype == 1) || (r->ringtype == 2) || (r->ringtype == 3)); }709 { assume(r != NULL); return ((getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Znm)); } 710 710 711 711 static inline BOOLEAN nCoeff_is_Zp(const coeffs r) -
libpolys/coeffs/rintegers.cc
rf3057e7 r66ce6d 430 430 r->nNULL = 0; 431 431 r->ch = 0; 432 r->ringtype = 4;433 432 r->has_simple_Alloc=FALSE; 434 433 r->has_simple_Inverse=FALSE; -
libpolys/coeffs/rmodulo2m.cc
rf3057e7 r66ce6d 54 54 r->modBase = (int_number) omAllocBin (gmp_nrz_bin); 55 55 mpz_init_set_si (r->modBase, 2L); 56 r->ringtype = 1;57 56 r->modNumber= (int_number) omAllocBin (gmp_nrz_bin); 58 57 mpz_init (r->modNumber); -
libpolys/coeffs/rmodulon.cc
rf3057e7 r66ce6d 55 55 nrnInitExp (info->exp, r); 56 56 57 if (info->exp > 1)58 r->ringtype= 3;59 else60 r->ringtype= 2;61 57 /* next computation may yield wrong characteristic as r->modNumber 62 58 is a GMP number */ … … 508 504 nCoeff_is_Ring_2toM(src) || nCoeff_is_Zp(src)) 509 505 { 510 if ( ( src->ringtype > 0)506 if ( (!nCoeff_is_Zp(src)) 511 507 && (mpz_cmp(src->modBase, dst->modBase) == 0) 512 508 && (src->modExponent == dst->modExponent)) return nrnMapGMP;
Note: See TracChangeset
for help on using the changeset viewer.