Changeset e6c3d1 in git for libpolys/coeffs/coeffs.h


Ignore:
Timestamp:
Jan 18, 2013, 3:20:53 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '4bd32dfef92ec9f5ed8dceee82d14318ae147107')
Children:
271d25946dbb409d16650bb1ecdffccf0c03594e65eb96fdc6f956671461df48dd8f6bde869c96f8
Parents:
2aee667644f2d68561171e8c9ca4258221af3702ebdbfddc10fbb7eff4bf79217b5742f5f24d9a78
Message:
Merge pull request #252 from alexanderdreyer/spielwiese-pyobject

Ensuring ./configure picks python2 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    rebdbfd re6c3d1  
    9494{
    9595   coeffs next;
    96    unsigned int ringtype;  /* =0 => coefficient field,
     96   /*unsigned int ringtype;  =0 => coefficient field,
    9797                             !=0 => coeffs from one of the rings:
    9898                              =1 => Z/2^mZ
     
    609609// Tests:
    610610static 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); }
    612612
    613613static 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); }
    615615
    616616static 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); }
    618618
    619619static 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); }
    621621
    622622static 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)); }
    624624
    625625/// returns TRUE, if r is not a field and r has no zero divisors (i.e is a domain)
     
    628628  assume(r != NULL);
    629629#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)));
    631631#else
    632632  return TRUE;
     
    707707/// returns TRUE, if r is not a field and r has non-trivial units
    708708static 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)); }
    710710
    711711static inline BOOLEAN nCoeff_is_Zp(const coeffs r)
Note: See TracChangeset for help on using the changeset viewer.