Changeset 488808e in git for libpolys/coeffs/coeffs.h
- Timestamp:
- May 26, 2011, 12:12:01 PM (13 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 5a4b26f3e00776270c3ba83b16c92a69f3cca0e0
- Parents:
- 73a9ffb72679635d0a4389f31022ac7b37564499
- git-author:
- Frank Seelisch <seelisch@mathematik.uni-kl.de>2011-05-26 12:12:01+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:53+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
r73a9ffb r488808e 45 45 typedef struct snumber * number; 46 46 47 struct snumber;48 typedef struct snumber * number;49 50 47 /* standard types */ 51 48 #ifdef HAVE_RINGS … … 58 55 59 56 struct n_Procs_s; 60 typedef struct n_Procs_s n_Procs_s;61 57 typedef struct n_Procs_s *coeffs; 62 58 … … 182 178 //------------------------------------------- 183 179 184 /// For Zp_a, Q_a we need polynomials (due to polys) 185 ring algring; //< implementation of extensions needs polynomials... 186 // // for Q_a/Zp_a, rInit 180 /* for extension fields we need to be able to represent polynomials, 181 so here is the polynomial ring: */ 182 ring algring; 183 187 184 //number minpoly; //< no longer needed: replaced by 188 185 // //< algring->minideal->[0] … … 222 219 intermediate extension fields, i.e., in this case 223 220 it is redundant along the chain of field extensions; 224 CONTRARY to SINGULAR as it was, we do NOT LONGER use 225 negative values for ch. */ 221 CONTRARY to SINGULAR as it was, we do NO LONGER use 222 negative values for ch; 223 for rings, ch will also be set and is - per def - 224 the smallest number of 1's that sum up to zero; 225 however, in this case ch may not fit in an int, 226 thus ch may contain a faulty value */ 226 227 227 228 short float_len; /* additional char-flags, rInit */ … … 233 234 // for n_GF 234 235 235 int m_nfCharQ; ///< the number of elem ts: q236 int m_nfCharQ; ///< the number of elements: q 236 237 int m_nfM1; ///< representation of -1 237 238 int m_nfCharP; ///< the characteristic: p … … 438 439 439 440 static inline BOOLEAN nCoeff_is_Zp(const coeffs r, int p) 440 { assume(r != NULL); return (getCoeffType(r) && (r->ch == ABS(p))); }441 { assume(r != NULL); return (getCoeffType(r) && (r->ch == p)); } 441 442 442 443 static inline BOOLEAN nCoeff_is_Q(const coeffs r) … … 447 448 // (r->ringtype == 0) && (r->ch == -1); ?? 448 449 449 450 450 static inline BOOLEAN nCoeff_is_R(const coeffs r) 451 451 { assume(r != NULL); return getCoeffType(r)==n_R; } … … 457 457 { assume(r != NULL); return (getCoeffType(r)==n_GF) && (r->ch == q); } 458 458 459 /* TRUE iff an extension tower is build upon some Zp, i.e., the bottom 460 field in this tower is Zp */ 459 /* TRUE iff r represents an algebraic or transcendental extension field */ 460 static inline BOOLEAN nCoeff_is_Extension(const coeffs r) 461 { 462 assume(r != NULL); 463 return (getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt); 464 } 465 466 /* DO NOT USE (only kept for compatibility reasons towards the SINGULAR 467 svn trunk); 468 intension: should be TRUE iff the given r is an extension field above 469 some Z/pZ; 470 actually: TRUE iff the given r is an extension tower of arbitrary 471 height above some field of characteristic p (may be Z/pZ or some 472 Galois field of characteristic p) */ 461 473 static inline BOOLEAN nCoeff_is_Zp_a(const coeffs r) 462 474 { 463 475 assume(r != NULL); 464 return (r->ringtype == 0) && 465 ((getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt)) && 466 (r->ch != 0); 467 } 468 469 /* TRUE iff an extension tower is build upon Zp (p as provided), i.e., 470 the bottom field in this tower is Zp */ 476 return ((r->ringtype == 0) && (r->ch != 0) && nCoeff_is_Extension(r)); 477 } 478 479 /* DO NOT USE (only kept for compatibility reasons towards the SINGULAR 480 svn trunk); 481 intension: should be TRUE iff the given r is an extension field above 482 Z/pZ (with p as provided); 483 actually: TRUE iff the given r is an extension tower of arbitrary 484 height above some field of characteristic p (may be Z/pZ or some 485 Galois field of characteristic p) */ 471 486 static inline BOOLEAN nCoeff_is_Zp_a(const coeffs r, int p) 472 487 { 473 488 assume(r != NULL); 474 return (r->ringtype == 0) && 475 ((getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt)) && 476 (r->ch != 0) && (r->ch == p); 477 } 478 479 /* TRUE iff an extension tower is build upon Q, i.e., 480 the bottom field in this tower is Q */ 489 return ((r->ringtype == 0) && (r->ch == p) && nCoeff_is_Extension(r)); 490 } 491 492 /* DO NOT USE (only kept for compatibility reasons towards the SINGULAR 493 svn trunk); 494 intension: should be TRUE iff the given r is an extension field 495 above Q; 496 actually: TRUE iff the given r is an extension tower of arbitrary 497 height above some field of characteristic 0 (may be Q, R, or C) */ 481 498 static inline BOOLEAN nCoeff_is_Q_a(const coeffs r) 482 499 { 483 500 assume(r != NULL); 484 return (r->ringtype == 0) && 485 ((getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt)) && 486 (r->ch == 0); 501 return ((r->ringtype == 0) && (r->ch == 0) && nCoeff_is_Extension(r)); 487 502 } 488 503 … … 507 522 // #endif 508 523 509 510 511 524 /// TRUE if n_Delete/n_New are empty operations 512 525 static inline BOOLEAN nCoeff_has_simple_Alloc(const coeffs r) … … 520 533 // || rField_is_R(r)); } 521 534 522 /* TRUE iff r represents an algebraic or transcendental extension field */523 static inline BOOLEAN nCoeff_is_Extension(const coeffs r)524 {525 assume(r != NULL);526 return (getCoeffType(r)==n_algExt) || (getCoeffType(r)==n_transExt);527 }528 529 535 /* TRUE iff r represents an algebraic extension field */ 530 536 static inline BOOLEAN nCoeff_is_algExt(const coeffs r)
Note: See TracChangeset
for help on using the changeset viewer.