Changeset e6c3d1 in git for libpolys/coeffs/coeffs.h
- Timestamp:
- Jan 18, 2013, 3:20:53 PM (11 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4bd32dfef92ec9f5ed8dceee82d14318ae147107')
- Children:
- 271d25946dbb409d16650bb1ecdffccf0c03594e65eb96fdc6f956671461df48dd8f6bde869c96f8
- Parents:
- 2aee667644f2d68561171e8c9ca4258221af3702ebdbfddc10fbb7eff4bf79217b5742f5f24d9a78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
rebdbfd re6c3d1 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)
Note: See TracChangeset
for help on using the changeset viewer.