Changeset 36a8e9 in git


Ignore:
Timestamp:
Jun 10, 2014, 11:57:17 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
52fa8a3284f79b8d72886464bd296025aa27a7e3
Parents:
6e062273c073575d1a635a3589c406ab6d4e0547
Message:
general nCoeff_is_field, nCoeff_is_domain
Location:
libpolys
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/OPAE.cc

    r6e0622 r36a8e9  
    309309BOOLEAN n_AEInitChar(coeffs r, void *)
    310310{
     311    // r->is_field, r->is_domain?
    311312    r->ch = 0;
    312313    r->cfKillChar=NULL;
  • libpolys/coeffs/OPAEQ.cc

    r6e0622 r36a8e9  
    302302BOOLEAN n_QAEInitChar(coeffs r, void *)
    303303{
     304    // r->is_field,is_domain?
    304305    r->ch=0;
    305306    r->cfKillChar=NULL;
  • libpolys/coeffs/OPAEp.cc

    r6e0622 r36a8e9  
    327327BOOLEAN n_pAEInitChar(coeffs r, void *p)
    328328{
     329    // r->is_field, is_domain
    329330    //Charakteristik abgreifen!
    330331    const int c = (int) (long) p;
  • libpolys/coeffs/coeffs.h

    r6e0622 r36a8e9  
    9292struct n_Procs_s
    9393{
     94   // administration of coeffs:
    9495   coeffs next;
    95    /*unsigned int ringtype;   =0 => coefficient field,
    96                              !=0 => coeffs from one of the rings:
    97                               =1 => Z/2^mZ
    98                               =2 => Z/nZ, n not a prime
    99                               =3 => Z/p^mZ
    100                               =4 => Z */
     96   int     ref;
     97   n_coeffType type;
     98   /// how many variables of factory are already used by this coeff
     99   int     factoryVarOffset;
    101100
    102101   // general properties:
     
    106105   /// if false, then a gcd routine is used for a content computation
    107106   BOOLEAN has_simple_Inverse;
     107
     108   /// TRUE, if cf is a field
     109   BOOLEAN is_field;
     110   /// TRUE, if cf is a domain
     111   BOOLEAN is_domain;
    108112
    109113   // tests for numbers.cc:
     
    283287   /// the 0 as constant, NULL by default
    284288   number nNULL;
    285    int     ref;
    286    /// how many variables of factort are already used by this coeff
    287    int     factoryVarOffset;
    288    n_coeffType type;
    289 
    290289
    291290   /// Number of Parameters in the coeffs (default 0)
     
    707706
    708707static inline BOOLEAN nCoeff_is_Ring(const coeffs r)
    709 { assume(r != NULL); return ((getCoeffType(r)==n_Z) || (getCoeffType(r)==n_Z2m) || (getCoeffType(r)==n_Zn) || (getCoeffType(r)==n_Znm)); }
    710 
    711 /// returns TRUE, if r is not a field and r has no zero divisors (i.e is a domain)
     708{ assume(r != NULL); return (r->is_field==0); }
     709
     710/// returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
    712711static inline BOOLEAN nCoeff_is_Domain(const coeffs r)
    713712{
    714713  assume(r != NULL);
    715 #ifdef HAVE_RINGS
    716   return (getCoeffType(r)==n_Z || ((getCoeffType(r)!=n_Z2m) && (getCoeffType(r)!=n_Zn) && (getCoeffType(r)!=n_Znm)));
    717 #else
    718   return TRUE;
    719 #endif
     714  return (r->is_domain);
    720715}
    721716
  • libpolys/coeffs/ffields.cc

    r6e0622 r36a8e9  
    830830BOOLEAN nfInitChar(coeffs r,  void * parameter)
    831831{
     832  r->is_field=TRUE;
     833  r->is_domain=TRUE;
    832834  //r->cfInitChar=npInitChar;
    833835  r->cfKillChar=nfKillChar;
  • libpolys/coeffs/gnumpc.cc

    r6e0622 r36a8e9  
    473473{
    474474  assume( getCoeffType(n) == ID );
     475  n->is_field=TRUE;
     476  n->is_domain=TRUE;
    475477
    476478  n->cfKillChar = ngcKillChar;
  • libpolys/coeffs/gnumpfl.cc

    r6e0622 r36a8e9  
    411411  assume( getCoeffType(n) == ID );
    412412
     413  n->is_field=TRUE;
     414  n->is_domain=TRUE;
     415
    413416  n->cfKillChar = ndKillChar; /* dummy */
    414417
  • libpolys/coeffs/longrat.cc

    r6e0622 r36a8e9  
    29762976BOOLEAN nlInitChar(coeffs r, void*p)
    29772977{
     2978  r->is_field=TRUE;
     2979  r->is_domain=TRUE;
     2980
    29782981  assume( getCoeffType(r) == ID );
    29792982  //const int ch = (int)(long)(p);
  • libpolys/coeffs/modulop.cc

    r6e0622 r36a8e9  
    454454
    455455  int i, w;
     456
     457  r->is_field=TRUE;
     458  r->is_domain=TRUE;
    456459
    457460  r->ch = c;
  • libpolys/coeffs/rintegers.cc

    r6e0622 r36a8e9  
    405405{
    406406  assume( getCoeffType(r) == ID );
     407
     408  r->is_field=FALSE;
     409  r->is_domain=TRUE;
     410
    407411  r->nCoeffIsEqual = ndCoeffIsEqual;
    408412  r->cfCoeffString = nrzCoeffString;
  • libpolys/coeffs/rmodulo2m.cc

    r6e0622 r36a8e9  
    102102  assume( getCoeffType(r) == ID );
    103103  nr2mInitExp((int)(long)(p), r);
     104
     105  r->is_field=FALSE;
     106  r->is_domain=FALSE;
     107
    104108  r->cfKillChar    = ndKillChar; /* dummy*/
    105109  r->nCoeffIsEqual = nr2mCoeffIsEqual;
  • libpolys/coeffs/rmodulon.cc

    r6e0622 r36a8e9  
    117117     is a GMP number */
    118118  r->ch = mpz_get_ui(r->modNumber);
     119
     120  r->is_field=FALSE;
     121  r->is_domain=FALSE;
     122
    119123
    120124  r->cfCoeffString = nrnCoeffString;
  • libpolys/coeffs/shortfl.cc

    r6e0622 r36a8e9  
    665665  assume( p == NULL );
    666666
     667  n->is_field=TRUE;
     668  n->is_domain=TRUE;
     669
    667670  n->cfKillChar = ndKillChar; /* dummy */
    668671  n->ch = 0;
  • libpolys/polys/clapconv.cc

    r6e0622 r36a8e9  
    9191  BOOLEAN setChar=TRUE;
    9292
     93  p=pReverse(p);
    9394  while ( p!=NULL )
    9495  {
     
    104105    result += term;
    105106    pIter( p );
    106   }
     107 }
    107108 return result;
    108109}
  • libpolys/polys/ext_fields/algext.cc

    r6e0622 r36a8e9  
    14201420     directly accessible in cf: */
    14211421  cf->ch = R->cf->ch;
     1422 
     1423  cf->is_field=TRUE;
     1424  cf->is_domain=TRUE;
    14221425
    14231426  #ifdef LDEBUG
  • libpolys/polys/ext_fields/transext.cc

    r6e0622 r36a8e9  
    24232423     directly accessible in cf: */
    24242424  cf->ch = R->cf->ch;
     2425
     2426  cf->is_field=TRUE;
     2427  cf->is_domain=TRUE;
     2428
    24252429  cf->factoryVarOffset = R->cf->factoryVarOffset + rVar(R);
    24262430  extern char* naCoeffString(const coeffs r);
Note: See TracChangeset for help on using the changeset viewer.