Coefficient rings, fields and other domains suitable for Singular polynomials.
More...
|
static FORCE_INLINE n_coeffType | getCoeffType (const coeffs r) |
| Returns the type of coeffs domain. More...
|
|
coeffs | nInitChar (n_coeffType t, void *parameter) |
| one-time initialisations for new coeffs in case of an error return NULL More...
|
|
static FORCE_INLINE coeffs | nCopyCoeff (const coeffs r) |
| "copy" coeffs, i.e. increment ref More...
|
|
void | nKillChar (coeffs r) |
| undo all initialisations More...
|
|
static FORCE_INLINE void | nSetChar (const coeffs r) |
| initialisations after each ring change More...
|
|
static FORCE_INLINE int | n_GetChar (const coeffs r) |
| Return the characteristic of the coeff. domain. More...
|
|
static FORCE_INLINE number | n_Copy (number n, const coeffs r) |
| return a copy of 'n' More...
|
|
static FORCE_INLINE void | n_Delete (number *p, const coeffs r) |
| delete 'p' More...
|
|
static FORCE_INLINE BOOLEAN | n_Equal (number a, number b, const coeffs r) |
| TRUE iff 'a' and 'b' represent the same number; they may have different representations. More...
|
|
static FORCE_INLINE BOOLEAN | n_IsZero (number n, const coeffs r) |
| TRUE iff 'n' represents the zero element. More...
|
|
static FORCE_INLINE BOOLEAN | n_IsOne (number n, const coeffs r) |
| TRUE iff 'n' represents the one element. More...
|
|
static FORCE_INLINE BOOLEAN | n_IsMOne (number n, const coeffs r) |
| TRUE iff 'n' represents the additive inverse of the one element, i.e. -1. More...
|
|
static FORCE_INLINE BOOLEAN | n_GreaterZero (number n, const coeffs r) |
| ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2), where m is the long representing n in C: TRUE iff (Im(n) != 0 and Im(n) >= 0) or (Im(n) == 0 and Re(n) >= 0) in K(a)/<p(a)>: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0 More...
|
|
static FORCE_INLINE BOOLEAN | n_Greater (number a, number b, const coeffs r) |
| ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the long's representing More...
|
|
static FORCE_INLINE BOOLEAN | n_IsUnit (number n, const coeffs r) |
| TRUE iff n has a multiplicative inverse in the given coeff field/ring r. More...
|
|
static FORCE_INLINE coeffs | n_CoeffRingQuot1 (number c, const coeffs r) |
|
static FORCE_INLINE int | n_DivComp (number a, number b, const coeffs r) |
|
static FORCE_INLINE number | n_GetUnit (number n, const coeffs r) |
| in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k in Z/2^kZ: largest odd divisor of n (taken in Z) other cases: not implemented More...
|
|
static FORCE_INLINE number | n_Init (long i, const coeffs r) |
| a number representing i in the given coeff field/ring r More...
|
|
static FORCE_INLINE number | n_InitMPZ (mpz_t n, const coeffs r) |
| conversion of a GMP integer to number More...
|
|
static FORCE_INLINE long | n_Int (number &n, const coeffs r) |
| conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 .. p/2] More...
|
|
static FORCE_INLINE void | n_MPZ (mpz_t result, number &n, const coeffs r) |
| conversion of n to a GMP integer; 0 if not possible More...
|
|
static FORCE_INLINE number | n_InpNeg (number n, const coeffs r) |
| in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned) More...
|
|
static FORCE_INLINE number | n_Invers (number a, const coeffs r) |
| return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible More...
|
|
static FORCE_INLINE int | n_Size (number n, const coeffs r) |
| return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used for pivot strategies in matrix computations with entries from r) More...
|
|
static FORCE_INLINE void | n_Normalize (number &n, const coeffs r) |
| inplace-normalization of n; produces some canonical representation of n; More...
|
|
static FORCE_INLINE void | n_WriteLong (number n, const coeffs r) |
| write to the output buffer of the currently used reporter More...
|
|
static FORCE_INLINE void | n_WriteShort (number n, const coeffs r) |
| write to the output buffer of the currently used reporter in a shortest possible way, e.g. in K(a): a2 instead of a^2 More...
|
|
static FORCE_INLINE void | n_Write (number n, const coeffs r, const BOOLEAN bShortOut=TRUE) |
|
static FORCE_INLINE const char * | n_Read (const char *s, number *a, const coeffs r) |
| !!! Recommendation: This method is too cryptic to be part of the user- !!! interface. As defined here, it is merely a helper !!! method for parsing number input strings. More...
|
|
static FORCE_INLINE number | n_GetDenom (number &n, const coeffs r) |
| return the denominator of n (if elements of r are by nature not fractional, result is 1) More...
|
|
static FORCE_INLINE number | n_GetNumerator (number &n, const coeffs r) |
| return the numerator of n (if elements of r are by nature not fractional, result is n) More...
|
|
static FORCE_INLINE number | n_Div (number a, number b, const coeffs r) |
| return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exception in Z: raises an error if 'a' is not divisible by 'b' always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a More...
|
|
static FORCE_INLINE number | n_ExactDiv (number a, number b, const coeffs r) |
| assume that there is a canonical subring in cf and we know that division is possible for these a and b in the subring, n_ExactDiv performs it, may skip additional tests. Can always be substituted by n_Div at the cost of larger computing time. More...
|
|
static FORCE_INLINE number | n_IntMod (number a, number b, const coeffs r) |
| for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,b,r) >=0 More...
|
|
static FORCE_INLINE void | n_Power (number a, int b, number *res, const coeffs r) |
| fill res with the power a^b More...
|
|
static FORCE_INLINE number | n_Mult (number a, number b, const coeffs r) |
| return the product of 'a' and 'b', i.e., a*b More...
|
|
static FORCE_INLINE void | n_InpMult (number &a, number b, const coeffs r) |
| multiplication of 'a' and 'b'; replacement of 'a' by the product a*b More...
|
|
static FORCE_INLINE void | n_InpAdd (number &a, number b, const coeffs r) |
| addition of 'a' and 'b'; replacement of 'a' by the sum a+b More...
|
|
static FORCE_INLINE number | n_Add (number a, number b, const coeffs r) |
| return the sum of 'a' and 'b', i.e., a+b More...
|
|
static FORCE_INLINE number | n_Sub (number a, number b, const coeffs r) |
| return the difference of 'a' and 'b', i.e., a-b More...
|
|
static FORCE_INLINE number | n_Gcd (number a, number b, const coeffs r) |
| in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in Q: return the gcd of the numerators of 'a' and 'b' in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented More...
|
|
static FORCE_INLINE number | n_SubringGcd (number a, number b, const coeffs r) |
|
static FORCE_INLINE number | n_ExtGcd (number a, number b, number *s, number *t, const coeffs r) |
| beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases... More...
|
|
static FORCE_INLINE number | n_XExtGcd (number a, number b, number *s, number *t, number *u, number *v, const coeffs r) |
|
static FORCE_INLINE number | n_EucNorm (number a, const coeffs r) |
|
static FORCE_INLINE number | n_Ann (number a, const coeffs r) |
| if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL More...
|
|
static FORCE_INLINE number | n_QuotRem (number a, number b, number *q, const coeffs r) |
|
static FORCE_INLINE number | n_Lcm (number a, number b, const coeffs r) |
| in Z: return the lcm of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ, C, R: not implemented in K(a)/<p(a)>: not implemented in K(t_1, ..., t_n): not implemented More...
|
|
static FORCE_INLINE number | n_NormalizeHelper (number a, number b, const coeffs r) |
| assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,b2)/1) More...
|
|
number | ndCopyMap (number a, const coeffs src, const coeffs dst) |
|
static FORCE_INLINE nMapFunc | n_SetMap (const coeffs src, const coeffs dst) |
| set the mapping function pointers for translating numbers from src to dst More...
|
|
static FORCE_INLINE BOOLEAN | n_DBTest (number n, const char *filename, const int linenumber, const coeffs r) |
| test whether n is a correct number; only used if LDEBUG is defined More...
|
|
static FORCE_INLINE void | n_CoeffWrite (const coeffs r, BOOLEAN details=TRUE) |
| output the coeff description More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_2toM (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_PtoM (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Domain (const coeffs r) |
| returns TRUE, if r is a field or r has no zero divisors (i.e is a domain) More...
|
|
static FORCE_INLINE BOOLEAN | n_DivBy (number a, number b, const coeffs r) |
| test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z: TRUE iff 'b' divides 'a' (with remainder = zero) in Z/nZ: TRUE iff (a = 0 and b divides n in Z) or (a != 0 and b/gcd(a, b) is co-prime with n, i.e. a unit in Z/nZ) in Z/2^kZ: TRUE iff ((a = 0 mod 2^k) and (b = 0 or b is a power of 2)) or ((a, b <> 0) and (b/gcd(a, b) is odd)) More...
|
|
static FORCE_INLINE number | n_ChineseRemainderSym (number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r) |
|
static FORCE_INLINE number | n_Farey (number a, number b, const coeffs r) |
|
static FORCE_INLINE int | n_ParDeg (number n, const coeffs r) |
|
static FORCE_INLINE int | n_NumberOfParameters (const coeffs r) |
| Returns the number of parameters. More...
|
|
static FORCE_INLINE char const ** | n_ParameterNames (const coeffs r) |
| Returns a (const!) pointer to (const char*) names of parameters. More...
|
|
static FORCE_INLINE number | n_Param (const int iParameter, const coeffs r) |
| return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...) More...
|
|
static FORCE_INLINE number | n_RePart (number i, const coeffs cf) |
|
static FORCE_INLINE number | n_ImPart (number i, const coeffs cf) |
|
static FORCE_INLINE BOOLEAN | nCoeff_has_Units (const coeffs r) |
| returns TRUE, if r is not a field and r has non-trivial units More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp (const coeffs r, int p) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Q (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Z (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Zn (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_or_BI (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_numeric (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_R (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_GF (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_GF (const coeffs r, int q) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Extension (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp_a (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Zp_a (const coeffs r, int p) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_a (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_long_R (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_long_C (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_CF (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_has_simple_inverse (const coeffs r) |
| TRUE, if the computation of the inverse is fast, i.e. prefer leading coeff. 1 over content. More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_has_simple_Alloc (const coeffs r) |
| TRUE if n_Delete is empty operation. More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_is_algExt (const coeffs r) |
| TRUE iff r represents an algebraic extension field. More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_algext (const coeffs r) |
| is it an alg. ext. of Q? More...
|
|
static FORCE_INLINE BOOLEAN | nCoeff_is_transExt (const coeffs r) |
| TRUE iff r represents a transcendental extension field. More...
|
|
static FORCE_INLINE void | n_ClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r) |
| Computes the content and (inplace) divides it out on a collection of numbers number c is the content (i.e. the GCD of all the coeffs, which we divide out inplace) NOTE: it assumes all coefficient numbers to be integer!!! NOTE/TODO: see also the description by Hans TODO: rename into n_ClearIntegerContent. More...
|
|
static FORCE_INLINE void | n_ClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, number &d, const coeffs r) |
| (inplace) Clears denominators on a collection of numbers number d is the LCM of all the coefficient denominators (i.e. the number with which all the number coeffs. were multiplied) NOTE/TODO: see also the description by Hans More...
|
|
static FORCE_INLINE void | n_ClearContent (ICoeffsEnumerator &numberCollectionEnumerator, const coeffs r) |
|
static FORCE_INLINE void | n_ClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, const coeffs r) |
|
void | n_Print (number &a, const coeffs r) |
| print a number (BEWARE of string buffers!) mostly for debugging More...
|
|
static FORCE_INLINE char * | nCoeffString (const coeffs cf) |
| TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar. More...
|
|
static FORCE_INLINE char * | nCoeffName (const coeffs cf) |
|
static FORCE_INLINE number | n_Random (siRandProc p, number p1, number p2, const coeffs cf) |
|
static FORCE_INLINE void | n_WriteFd (number a, const ssiInfo *f, const coeffs r) |
| io via ssi: More...
|
|
static FORCE_INLINE number | n_ReadFd (const ssiInfo *f, const coeffs r) |
| io via ssi: More...
|
|
static FORCE_INLINE number | n_convFactoryNSingN (const CanonicalForm n, const coeffs r) |
|
static FORCE_INLINE CanonicalForm | n_convSingNFactoryN (number n, BOOLEAN setChar, const coeffs r) |
|
static FORCE_INLINE void | number2mpz (number n, coeffs c, mpz_t m) |
|
static FORCE_INLINE number | mpz2number (mpz_t m, coeffs c) |
|