Changeset b56249 in git for libpolys


Ignore:
Timestamp:
Apr 23, 2013, 5:00:16 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5782e2d7947412c3820f7bd158d09b128c888ca9
Parents:
888b45777bfde99aa51caf2645601ffcc66fa35e
Message:
Misc fixes due to building on Mac OS X 10.6

fix: no  pyobject-building if configured without dynamic loading
chg: minor include reordering + forward declarations + cosmetics
fix: AM_COND_IF may be undefined in older automake/autoconf
fix: distribute ALL tested tests
fix: no double definition of NATNUMBER/int_number in structs.h
fix: n_ExtGcd is not always related to HAVE_RINGS
Location:
libpolys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    r888b457 rb56249  
    139139   void     (*cfMPZ)(mpz_t result, number &n, const coeffs r);
    140140   
    141 #ifdef HAVE_RINGS
    142    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 #endif
    146 
    147141   /// changes argument  inline: a:= -a
    148142   /// return -a! (no copy is returned)
     
    165159   const char *  (*cfRead)(const char * s, number * a, const coeffs r);
    166160   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   
    167170   BOOLEAN (*cfGreater)(number a,number b, const coeffs r),
    168 #ifdef HAVE_RINGS
    169            (*cfDivBy)(number a, number b, const coeffs r),
    170 #endif
    171171            /// tests
    172172           (*cfEqual)(number a,number b, const coeffs r),
     
    428428
    429429#ifdef HAVE_RINGS
     430static 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
    430433/// TRUE iff n has a multiplicative inverse in the given coeff field/ring r
    431434static inline BOOLEAN n_IsUnit(number n, const coeffs r)
    432435{ 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); }
    439436
    440437/// in Z: 1
     
    577574{ assume(r != NULL); assume(r->cfGcd!=NULL); return r->cfGcd(a,b,r); }
    578575
     576/// beware that ExtGCD is only relevant for a few chosen coeff. domains
     577/// and may perform something unexpected in some cases...
     578static 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
    579581/// in Z: return the lcm of 'a' and 'b'
    580582/// in Z/nZ, Z/2^kZ: computed as in the case Z
     
    819821// Missing wrappers for: (TODO: review this?)
    820822// cfIntMod, cfRead, cfName, cfInit_bigint
    821 // HAVE_RINGS: cfDivComp, cfExtGcd...
     823
     824// HAVE_RINGS: cfDivComp, cfIsUnit, cfGetUnit, cfDivBy
     825// BUT NOT cfExtGcd...!
    822826
    823827
  • libpolys/polys/nc/gb_hack.h

    r888b457 rb56249  
    66#ifdef PLURAL_INTERNAL_DECLARATIONS
    77
    8 struct  spolyrec;
    9 typedef struct spolyrec    polyrec;
    10 typedef polyrec *          poly;
    11 
    12 struct ip_sring;
    13 typedef struct ip_sring *         ring;
     8struct  spolyrec; typedef struct spolyrec    polyrec; typedef polyrec *          poly;
     9struct ip_sring; typedef struct ip_sring *         ring;
     10struct sip_sideal; typedef struct sip_sideal *       ideal;
    1411
    1512class intvec;
    16 
    17 struct sip_sideal;
    18 typedef struct sip_sideal *       ideal;
    1913
    2014class skStrategy; typedef skStrategy * kStrategy;
  • libpolys/polys/prCopy.h

    r888b457 rb56249  
    88*/
    99
     10struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly;
     11struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring;
     12struct sip_sideal; typedef struct sip_sideal *ideal;
    1013
    1114/*************************************************************************
Note: See TracChangeset for help on using the changeset viewer.