Changeset b807aa0 in git


Ignore:
Timestamp:
Jul 16, 2012, 8:43:30 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
644f813f8a73f38c6448af263a3ee11e37731a67
Parents:
cc7180ed9409923477370909b14bca995904b313
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-16 20:43:30+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-17 21:33:54+02:00
Message:
minor improvements at coeffs

add: doxygen
chg: avoid access to internals AFAP + more assumes
chg: eliminate compiler warning about an unused function argument
Location:
libpolys/coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    rcc7180 rb807aa0  
    2121{
    2222  n_unknown=0,
    23   n_Zp,
    24   n_Q,
    25   n_R,
    26   n_GF,
    27   n_long_R,
     23  n_Zp, /**< \F{p < ?} */
     24  n_Q,  /**< rational (GMP) numbers */
     25  n_R,  /**< single prescision (6,6) real numbers */
     26  n_GF, /**< \GF{p^n < 32001?} */
     27  n_long_R, /**< real (GMP) numbers */
    2828  n_algExt,  /**< used for all algebraic extensions, i.e.,
    2929                the top-most extension in an extension tower
     
    3232                  the top-most extension in an extension tower
    3333                  is transcendental */
    34   n_long_C,
    35   // only used if HAVE_RINGS is defined:
    36   n_Z,
    37   n_Zn,
    38   n_Zpn, // does no longer exist?
    39   n_Z2m,
    40   n_CF
     34  n_long_C, /**< complex (GMP) numbers */
     35  n_Z, /**< only used if HAVE_RINGS is defined: ? */
     36  n_Zn, /**< only used if HAVE_RINGS is defined: ? */
     37  n_Zpn, /**< only used if HAVE_RINGS is defined: does no longer exist? */
     38  n_Z2m, /**< only used if HAVE_RINGS is defined: ? */
     39  n_CF /**< ? */
    4140};
    4241
     
    335334
    336335
     336/// Return the characteristic of the coeff. domain.
     337static inline int n_GetChar(const coeffs r)
     338{
     339  assume(r != NULL);
     340  return r->ch;
     341}
     342
     343
    337344// the access methods (part 2):
    338345
     
    723730{
    724731  assume(r != NULL);
    725   return ((r->ringtype == 0) && (r->ch != 0) && nCoeff_is_Extension(r));
     732  return ((!nCoeff_is_Ring(r)) && (n_GetChar(r) != 0) && nCoeff_is_Extension(r));
    726733}
    727734
     
    736743{
    737744  assume(r != NULL);
    738   return ((r->ringtype == 0) && (r->ch == p) && nCoeff_is_Extension(r));
     745  assume(p != 0);
     746  return ((!nCoeff_is_Ring(r)) && (n_GetChar(r) == p) && nCoeff_is_Extension(r));
    739747}
    740748
     
    748756{
    749757  assume(r != NULL);
    750   return ((r->ringtype == 0) && (r->ch == 0) && nCoeff_is_Extension(r));
     758  return ((!nCoeff_is_Ring(r)) && (n_GetChar(r) == 0) && nCoeff_is_Extension(r));
    751759}
    752760
     
    784792// HAVE_RINGS: cfDivComp, cfExtGcd...
    785793
    786 /// Return the characteristic of the coeff. domain.
    787 static inline int n_GetChar(const coeffs r)
    788 {
    789   assume(r != NULL);
    790   return r->ch;
    791 }
    792 
    793 #endif
    794 
     794
     795#endif
     796
  • libpolys/coeffs/numbers.cc

    rcc7180 rb807aa0  
    8888}
    8989
    90 static number ndParameter(const int i, const coeffs r)
     90static number ndParameter(const int, const coeffs r)
    9191{
    9292  Werror("ndParameter: n_Parameter is not implemented/relevant for (coeff_type = %d)",getCoeffType(r));
Note: See TracChangeset for help on using the changeset viewer.