Changeset 5b5409b in git


Ignore:
Timestamp:
Nov 26, 2013, 2:43:37 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
Children:
42d46458a0e86089ca652e1ac940ee8e605eb7d0
Parents:
98e588265496a69b639a1e37bf39d39134a6df5f
Message:
flint stuff: move optional parts to the end in coeffs
Location:
libpolys/coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    r98e588 r5b5409b  
    158158   void    (*cfNormalize)(number &a, const coeffs r);
    159159
    160 #ifdef HAVE_RINGS
    161    int     (*cfDivComp)(number a,number b,const coeffs r);
    162    BOOLEAN (*cfIsUnit)(number a,const coeffs r);
    163    number  (*cfGetUnit)(number a,const coeffs r);
    164    BOOLEAN (*cfDivBy)(number a, number b, const coeffs r);
    165 #endif
    166160
    167161
     
    219213   CanonicalForm (*convSingNFactoryN)( number n, BOOLEAN setChar, const coeffs r );
    220214
    221 #ifdef LDEBUG
    222    /// Test: is "a" a correct number?
    223    BOOLEAN (*cfDBTest)(number a, const char *f, const int l, const coeffs r);
    224 #endif
    225215
    226216   /// the 0 as constant, NULL by default
     
    255245
    256246
     247  int        ch;  /* characteristic, set by the local *InitChar methods;
     248                     In field extensions or extensions towers, the
     249                     characteristic can be accessed from any of the
     250                     intermediate extension fields, i.e., in this case
     251                     it is redundant along the chain of field extensions;
     252                     CONTRARY to SINGULAR as it was, we do NO LONGER use
     253                     negative values for ch;
     254                     for rings, ch will also be set and is - per def -
     255                     the smallest number of 1's that sum up to zero;
     256                     however, in this case ch may not fit in an int,
     257                     thus ch may contain a faulty value */
     258
     259  short      float_len; /* additional char-flags, rInit */
     260  short      float_len2; /* additional char-flags, rInit */
     261
     262//  BOOLEAN   CanShortOut; //< if the elements can be printed in short format
     263//                       // this is set to FALSE if a parameter name has >2 chars
     264//  BOOLEAN   ShortOut; //< if the elements should print in short format
     265
     266// ---------------------------------------------------
     267  // for n_GF
     268
     269  int m_nfCharQ;  ///< the number of elements: q
     270  int m_nfM1;       ///< representation of -1
     271  int m_nfCharP;  ///< the characteristic: p
     272  int m_nfCharQ1; ///< q-1
     273  unsigned short *m_nfPlus1Table;
     274  int *m_nfMinPoly;
     275
     276// ---------------------------------------------------
     277// for Zp:
     278  unsigned short *npInvTable;
     279  unsigned short *npExpTable;
     280  unsigned short *npLogTable;
     281   //   int npPrimeM; // NOTE: npPrimeM is deprecated, please use ch instead!
     282  int npPminus1M; ///< characteristic - 1
    257283//-------------------------------------------
    258284#ifdef HAVE_RINGS
     285   int     (*cfDivComp)(number a,number b,const coeffs r);
     286   BOOLEAN (*cfIsUnit)(number a,const coeffs r);
     287   number  (*cfGetUnit)(number a,const coeffs r);
     288   BOOLEAN (*cfDivBy)(number a, number b, const coeffs r);
    259289  /* The following members are for representing the ring Z/n,
    260290     where n is not a prime. We distinguish four cases:
     
    281311  unsigned long mod2mMask;
    282312#endif
    283   int        ch;  /* characteristic, set by the local *InitChar methods;
    284                      In field extensions or extensions towers, the
    285                      characteristic can be accessed from any of the
    286                      intermediate extension fields, i.e., in this case
    287                      it is redundant along the chain of field extensions;
    288                      CONTRARY to SINGULAR as it was, we do NO LONGER use
    289                      negative values for ch;
    290                      for rings, ch will also be set and is - per def -
    291                      the smallest number of 1's that sum up to zero;
    292                      however, in this case ch may not fit in an int,
    293                      thus ch may contain a faulty value */
    294 
    295   short      float_len; /* additional char-flags, rInit */
    296   short      float_len2; /* additional char-flags, rInit */
    297 
    298 //  BOOLEAN   CanShortOut; //< if the elements can be printed in short format
    299 //                       // this is set to FALSE if a parameter name has >2 chars
    300 //  BOOLEAN   ShortOut; //< if the elements should print in short format
    301 
    302 // ---------------------------------------------------
    303   // for n_GF
    304 
    305   int m_nfCharQ;  ///< the number of elements: q
    306   int m_nfM1;       ///< representation of -1
    307   int m_nfCharP;  ///< the characteristic: p
    308   int m_nfCharQ1; ///< q-1
    309   unsigned short *m_nfPlus1Table;
    310   int *m_nfMinPoly;
    311 
    312 // ---------------------------------------------------
    313 // for Zp:
    314 #ifdef HAVE_DIV_MOD
    315   unsigned short *npInvTable;
     313#ifdef LDEBUG
     314   // must be last entry:
     315   /// Test: is "a" a correct number?
     316   BOOLEAN (*cfDBTest)(number a, const char *f, const int l, const coeffs r);
    316317#endif
    317 #if !defined(HAVE_DIV_MOD) || !defined(HAVE_MULT_MOD)
    318   unsigned short *npExpTable;
    319   unsigned short *npLogTable;
    320 #endif
    321    //   int npPrimeM; // NOTE: npPrimeM is deprecated, please use ch instead!
    322   int npPminus1M; ///< characteristic - 1
    323318};
    324319//
  • libpolys/coeffs/numbers.cc

    r98e588 r5b5409b  
    442442   
    443443#ifdef LDEBUG
    444     assume(n->cfDBTest!=NULL);
     444    if(n->cfDBTest==NULL)
     445    { n->cfDBTest=ndDBTest;Warn("cfDBTest is NULL for coeff %d",t); }
    445446#endif
    446447    assume(n->type==t);
Note: See TracChangeset for help on using the changeset viewer.