Changeset 7dce2d7 in git


Ignore:
Timestamp:
Apr 20, 2011, 5:24:15 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
9765f3b4f33f8fae7a5ca4ed7831d01d8ca37a06
Parents:
7f602bf34cba1848ae22dbe21a65ea4f2460604f
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-04-20 17:24:15+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:21+01:00
Message:
add comments to some coeff functions
add p_EqualPolys
fix warnings in mod_raw.cc
Location:
libpolys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    r7f602b r7dce2d7  
    378378{ return (r->ringtype != 0); }
    379379
     380/// returns TRUE, if r is not a field and r has no zero divisors (i.e is a domain)
    380381static inline BOOLEAN nCoeff_is_Domain(const coeffs r)
    381382{ return (r->ringtype == 4 || r->ringtype == 0); }
    382383
     384/// returns TRUE, if r is not a field and r has non-trivial units
    383385static inline BOOLEAN nCoeff_has_Units(const coeffs r)
    384386{ return ((r->ringtype == 1) || (r->ringtype == 2) || (r->ringtype == 3)); }
     
    423425{ return getCoeffType(r)==n_CF; }
    424426
     427/// TRUE, if the computation of the inverse is fast (i.e. prefer leading coeff. 1 over content)
    425428static inline BOOLEAN nCoeff_has_simple_inverse(const coeffs r)
    426429{ return r->has_simple_Inverse; }
    427430/* Z/2^n, Z/p, GF(p,n), R, long_R, long_C*/
    428431
     432/// TRUE if n_Delete/n_New are empty operations
    429433static inline BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
    430434{ return r->has_simple_Alloc; }
  • libpolys/polys/monomials/p_polys.cc

    r7f602b r7dce2d7  
    35333533}
    35343534
     3535BOOLEAN p_EqualPolys(poly p1,poly p2, const ring r)
     3536{
     3537  while ((p1 != NULL) && (p2 != NULL))
     3538  {
     3539    if (! p_LmEqual(p1, p2,r))
     3540      return FALSE;
     3541    if (! n_Equal(p_GetCoeff(p1,r), p_GetCoeff(p2,r),r ))
     3542      return FALSE;
     3543    pIter(p1);
     3544    pIter(p2);
     3545  }
     3546  return (p1==p2);
     3547}
    35353548
    35363549/*2
  • libpolys/polys/templates/mod_raw.cc

    r7f602b r7dce2d7  
    3939lib_types type_of_LIB(char *newlib, char *libnamebuf)
    4040{
    41   const char mach_o[]={0xfe,0xed,0xfa,0xce,0};
    42   const char mach_o_module[]={0xce,0xfa,0xed,0xfe,0};
     41  const unsigned char mach_o[]={0xfe,0xed,0xfa,0xce,0};
     42  const unsigned char mach_o_module[]={0xce,0xfa,0xed,0xfe,0};
    4343  char        buf[BYTES_TO_CHECK+1];        /* one extra for terminating '\0' */
    4444  struct stat sb;
     
    7777  }
    7878
    79   if( (strncmp(buf, &mach_o[0], 4)==0)) /* generic Mach-O module */
     79  if( (strncmp(buf, (const char *)mach_o, 4)==0)) /* generic Mach-O module */
    8080  {
    8181    LT = LT_MACH_O;
Note: See TracChangeset for help on using the changeset viewer.