Changeset 8d256cb in git


Ignore:
Timestamp:
Feb 8, 2019, 11:26:58 AM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3720ae8bfcff4a4649ee98a15552089151d2d59b')
Children:
6f436cee4c0e7832bca821c412cc8ca78865a460
Parents:
b3e931b4c9148576d127f3b957900899fa358767
Message:
opt: rFieldType
Location:
libpolys/polys/monomials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/ring.cc

    rb3e931b r8d256cb  
    51305130  int lb = rBlocks(r) - 2;
    51315131  return (r->order[lb] == ringorder_c || r->order[lb] == ringorder_C);
    5132 }
    5133 
    5134 n_coeffType rFieldType(ring r)
    5135 {
    5136   return (r->cf->type);
    5137   if (rField_is_Zp(r))     return n_Zp;
    5138   if (rField_is_Q(r))      return n_Q;
    5139   if (rField_is_R(r))      return n_R;
    5140   if (rField_is_GF(r))     return n_GF;
    5141   if (rField_is_long_R(r)) return n_long_R;
    5142   if (rField_is_Zp_a(r))   return getCoeffType(r->cf);
    5143   if (rField_is_Q_a(r))    return getCoeffType(r->cf);
    5144   if (rField_is_long_C(r)) return n_long_C;
    5145   if (rField_is_Z(r))         return n_Z;
    5146   if (rField_is_Zn(r))        return n_Zn;
    5147   if (rField_is_Ring_PtoM(r)) return n_Znm;
    5148   if (rField_is_Ring_2toM(r)) return  n_Z2m;
    5149 
    5150   return n_unknown;
    51515132}
    51525133
  • libpolys/polys/monomials/ring.h

    rb3e931b r8d256cb  
    548548{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); }
    549549
    550 n_coeffType rFieldType(const ring r);
     550/// the type of the coefficient filed of r (n_Zp, n_Q, etc)
     551static inline n_coeffType rFieldType(const ring r) { return (r->cf->type); }
    551552
    552553/// this needs to be called whenever a new ring is created: new fields
Note: See TracChangeset for help on using the changeset viewer.