 |
My Project
debian-1:4.1.1-p2+ds-4build1
|
Go to the source code of this file.
|
enum | n_coeffType {
n_unknown =0,
n_Zp,
n_Q,
n_R,
n_GF,
n_long_R,
n_polyExt,
n_algExt,
n_transExt,
n_long_C,
n_nTupel,
n_Z,
n_Zn,
n_Znm,
n_Z2m,
n_CF
} |
|
enum | n_coeffRep {
n_rep_unknown =0,
n_rep_int,
n_rep_gap_rat,
n_rep_gap_gmp,
n_rep_poly,
n_rep_rat_fct,
n_rep_gmp,
n_rep_float,
n_rep_gmp_float,
n_rep_gmp_complex,
n_rep_gf
} |
|
|
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...
|
|
void | nNew (number *a) |
|
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 const FORCE_INLINE 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...
|
|
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_ModN (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_PtoM (const coeffs r) |
|
static FORCE_INLINE BOOLEAN | nCoeff_is_Ring_Z (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 const char ** | 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_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/n_New are empty operations. 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, FILE *f, const coeffs r) |
| io via ssi: More...
|
|
static FORCE_INLINE number | n_ReadFd (s_buff f, const coeffs r) |
| io via ssi: More...
|
|
number | n_convFactoryNSingN (const CanonicalForm n, const coeffs r) |
|
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) |
|
Coefficient rings, fields and other domains suitable for Singular polynomials
The main interface for Singular coefficients: coeffs is the main handler for Singular numbers
Definition in file coeffs.h.
◆ GFInfo
Creation data needed for finite fields.
Definition at line 92 of file coeffs.h.
Data Fields |
int |
GFChar |
|
int |
GFDegree |
|
const char * |
GFPar_name |
|
◆ LongComplexInfo
Definition at line 99 of file coeffs.h.
Data Fields |
short |
float_len |
additional char-flags, rInit |
short |
float_len2 |
additional char-flags, rInit |
const char * |
par_name |
parameter name |
◆ ALLOC0_RNUMBER
◆ ALLOC_RNUMBER
◆ FREE_RNUMBER
◆ n_New
#define n_New |
( |
|
n, |
|
|
|
r |
|
) |
| nNew(n) |
◆ n_Test
#define n_Test |
( |
|
a, |
|
|
|
r |
|
) |
| n_DBTest(a, __FILE__, __LINE__, r) |
◆ ICoeffsEnumerator
Abstract interface for an enumerator of number coefficients for an object, e.g. a polynomial.
Definition at line 78 of file coeffs.h.
◆ nCoeffsEnumeratorFunc
goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number;
Definition at line 82 of file coeffs.h.
◆ nMapFunc
maps "a", which lives in src, into dst
Definition at line 73 of file coeffs.h.
◆ numberfunc
typedef number(* numberfunc) (number a, number b, const coeffs r) |
◆ n_coeffRep
Enumerator |
---|
n_rep_unknown | |
n_rep_int | (int), see modulop.h
|
n_rep_gap_rat | (number), see longrat.h
|
n_rep_gap_gmp | (), see rinteger.h, new impl.
|
n_rep_poly | (poly), see algext.h
|
n_rep_rat_fct | (fraction), see transext.h
|
n_rep_gmp | (mpz_ptr), see rmodulon,h
|
n_rep_float | (float), see shortfl.h
|
n_rep_gmp_float | (gmp_float), see
|
n_rep_gmp_complex | (gmp_complex), see gnumpc.h
|
n_rep_gf | (int), see ffields.h
|
Definition at line 107 of file coeffs.h.
◆ n_coeffType
Enumerator |
---|
n_unknown | |
n_Zp | \F{p < 2^31}
|
n_Q | rational (GMP) numbers
|
n_R | single prescision (6,6) real numbers
|
n_GF | \GF{p^n < 2^16}
|
n_long_R | real floating point (GMP) numbers
|
n_polyExt | used to represent polys as coeffcients
|
n_algExt | used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
|
n_transExt | used for all transcendental extensions, i.e., the top-most extension in an extension tower is transcendental
|
n_long_C | complex floating point (GMP) numbers
|
n_nTupel | n-tupel of cf: ZZ/p1,...
ZZ/pn, R, long_R
|
n_Z | only used if HAVE_RINGS is defined
|
n_Zn | only used if HAVE_RINGS is defined
|
n_Znm | only used if HAVE_RINGS is defined
|
n_Z2m | only used if HAVE_RINGS is defined
|
n_CF | ?
|
Definition at line 26 of file coeffs.h.
◆ getCoeffType()
Returns the type of coeffs domain.
Definition at line 421 of file coeffs.h.
◆ mpz2number()
◆ n_Add()
return the sum of 'a' and 'b', i.e., a+b
Definition at line 656 of file coeffs.h.
662 if( r->cfIsZero(sum,r) )
STATISTIC(n_CancelOut);
◆ n_Ann()
if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL
Definition at line 701 of file coeffs.h.
◆ n_ChineseRemainderSym()
◆ n_ClearContent() [1/2]
◆ n_ClearContent() [2/2]
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.
Definition at line 941 of file coeffs.h.
◆ n_ClearDenominators() [1/2]
◆ n_ClearDenominators() [2/2]
(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
Definition at line 948 of file coeffs.h.
◆ n_CoeffRingQuot1()
◆ n_CoeffWrite()
output the coeff description
Definition at line 741 of file coeffs.h.
◆ n_convFactoryNSingN()
◆ n_convSingNFactoryN()
◆ n_Copy()
return a copy of 'n'
Definition at line 451 of file coeffs.h.
◆ n_DBTest()
test whether n is a correct number; only used if LDEBUG is defined
Definition at line 727 of file coeffs.h.
◆ n_Delete()
◆ n_Div()
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
Definition at line 615 of file coeffs.h.
◆ n_DivBy()
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))
Definition at line 783 of file coeffs.h.
789 assume(r->cfDivBy!=
NULL);
return r->cfDivBy(a,
b,r);
◆ n_DivComp()
◆ n_Equal()
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
Definition at line 460 of file coeffs.h.
◆ n_EucNorm()
◆ n_ExactDiv()
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.
Definition at line 622 of file coeffs.h.
◆ n_ExtGcd()
beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases...
Definition at line 693 of file coeffs.h.
◆ n_Farey()
◆ n_Gcd()
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
Definition at line 686 of file coeffs.h.
◆ n_GetChar()
Return the characteristic of the coeff. domain.
Definition at line 444 of file coeffs.h.
◆ n_GetDenom()
return the denominator of n (if elements of r are by nature not fractional, result is 1)
Definition at line 603 of file coeffs.h.
◆ n_GetNumerator()
return the numerator of n (if elements of r are by nature not fractional, result is n)
Definition at line 608 of file coeffs.h.
◆ n_GetUnit()
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
Definition at line 532 of file coeffs.h.
◆ n_Greater()
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
in C: TRUE iff (Im(a) > Im(b)) in K(a)/<p(a)>: TRUE iff (a != 0 and (b == 0 or deg(a) > deg(b)) in K(t_1, ..., t_n): TRUE only if one or both numerator polynomials are zero or if their degrees are equal. In this case, TRUE if LC(numerator(a)) > LC(numerator(b)) in Z/2^kZ: TRUE if n_DivBy(a, b) in Z/mZ: TRUE iff the internal mpz's fulfill the relation '>' in Z: TRUE iff a > b
!!! Recommendation: remove implementations for unordered fields !!! and raise errors instead, in these cases
Definition at line 511 of file coeffs.h.
◆ n_GreaterZero()
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
!!! Recommendation: remove implementations for unordered fields !!! and raise errors instead, in these cases !!! Do not follow this recommendation: while writing polys, !!! between 2 monomials will be an additional + iff !n_GreaterZero(next coeff) Then change definition to include n_GreaterZero => printing does NOT start with -
Definition at line 494 of file coeffs.h.
◆ n_ImPart()
◆ n_Init()
a number representing i in the given coeff field/ring r
Definition at line 538 of file coeffs.h.
◆ n_InitMPZ()
conversion of a GMP integer to number
Definition at line 542 of file coeffs.h.
◆ n_InpAdd()
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
Definition at line 646 of file coeffs.h.
652 if( r->cfIsZero(a,r) )
STATISTIC(n_CancelOut);
◆ n_InpMult()
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
Definition at line 641 of file coeffs.h.
◆ n_InpNeg()
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition at line 557 of file coeffs.h.
◆ n_Int()
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 .. p/2]
Definition at line 547 of file coeffs.h.
◆ n_IntMod()
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
Definition at line 628 of file coeffs.h.
◆ n_Invers()
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
!!! Recommendation: rename to 'n_Inverse'
Definition at line 564 of file coeffs.h.
◆ n_IsMOne()
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
Definition at line 472 of file coeffs.h.
◆ n_IsOne()
TRUE iff 'n' represents the one element.
Definition at line 468 of file coeffs.h.
◆ n_IsUnit()
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
Definition at line 515 of file coeffs.h.
◆ n_IsZero()
TRUE iff 'n' represents the zero element.
Definition at line 464 of file coeffs.h.
◆ n_Lcm()
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
Definition at line 712 of file coeffs.h.
◆ n_MPZ()
conversion of n to a GMP integer; 0 if not possible
Definition at line 551 of file coeffs.h.
◆ n_Mult()
return the product of 'a' and 'b', i.e., a*b
Definition at line 636 of file coeffs.h.
◆ n_Normalize()
inplace-normalization of n; produces some canonical representation of n;
!!! Recommendation: remove this method from the user-interface, i.e., !!! this should be hidden
Definition at line 578 of file coeffs.h.
◆ n_NormalizeHelper()
assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,b2)/1)
Definition at line 717 of file coeffs.h.
◆ n_NumberOfParameters()
Returns the number of parameters.
Definition at line 804 of file coeffs.h.
◆ n_Param()
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...)
Definition at line 813 of file coeffs.h.
◆ n_ParameterNames()
Returns a (const!) pointer to (const char*) names of parameters.
Definition at line 808 of file coeffs.h.
◆ n_ParDeg()
◆ n_Power()
fill res with the power a^b
Definition at line 632 of file coeffs.h.
◆ n_Print()
print a number (BEWARE of string buffers!) mostly for debugging
Definition at line 581 of file numbers.cc.
◆ n_QuotRem()
◆ n_Random()
◆ n_Read()
!!! 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.
Definition at line 598 of file coeffs.h.
◆ n_ReadFd()
◆ n_RePart()
◆ n_SetMap()
set the mapping function pointers for translating numbers from src to dst
Definition at line 721 of file coeffs.h.
◆ n_Size()
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)
Definition at line 570 of file coeffs.h.
◆ n_Sub()
return the difference of 'a' and 'b', i.e., a-b
Definition at line 669 of file coeffs.h.
675 if( r->cfIsZero(d,r) )
STATISTIC(n_CancelOut);
◆ n_SubringGcd()
◆ n_Write()
◆ n_WriteFd()
◆ n_WriteLong()
write to the output buffer of the currently used reporter
Definition at line 583 of file coeffs.h.
◆ n_WriteShort()
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
Definition at line 588 of file coeffs.h.
◆ n_XExtGcd()
static FORCE_INLINE number n_XExtGcd |
( |
number |
a, |
|
|
number |
b, |
|
|
number * |
s, |
|
|
number * |
t, |
|
|
number * |
u, |
|
|
number * |
v, |
|
|
const coeffs |
r |
|
) |
| |
|
static |
◆ nCoeff_has_simple_Alloc()
TRUE if n_Delete/n_New are empty operations.
Definition at line 919 of file coeffs.h.
921 {
assume(r !=
NULL);
return r->has_simple_Alloc; }
◆ nCoeff_has_simple_inverse()
TRUE, if the computation of the inverse is fast, i.e. prefer leading coeff. 1 over content.
Definition at line 915 of file coeffs.h.
917 {
assume(r !=
NULL);
return r->has_simple_Inverse; }
◆ nCoeff_has_Units()
returns TRUE, if r is not a field and r has non-trivial units
Definition at line 827 of file coeffs.h.
◆ nCoeff_is_algExt()
TRUE iff r represents an algebraic extension field.
Definition at line 923 of file coeffs.h.
◆ nCoeff_is_CF()
◆ nCoeff_is_Domain()
returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
Definition at line 769 of file coeffs.h.
773 return (r->is_domain);
◆ nCoeff_is_Extension()
◆ nCoeff_is_GF() [1/2]
◆ nCoeff_is_GF() [2/2]
◆ nCoeff_is_long_C()
◆ nCoeff_is_long_R()
◆ nCoeff_is_numeric()
◆ nCoeff_is_Q()
◆ nCoeff_is_Q_a()
◆ nCoeff_is_Q_algext()
is it an alg. ext. of Q?
Definition at line 927 of file coeffs.h.
◆ nCoeff_is_Q_or_BI()
◆ nCoeff_is_R()
◆ nCoeff_is_Ring()
◆ nCoeff_is_Ring_2toM()
◆ nCoeff_is_Ring_ModN()
◆ nCoeff_is_Ring_PtoM()
◆ nCoeff_is_Ring_Z()
◆ nCoeff_is_transExt()
TRUE iff r represents a transcendental extension field.
Definition at line 931 of file coeffs.h.
◆ nCoeff_is_Z()
◆ nCoeff_is_Zp() [1/2]
◆ nCoeff_is_Zp() [2/2]
◆ nCoeff_is_Zp_a() [1/2]
◆ nCoeff_is_Zp_a() [2/2]
◆ nCoeffName()
◆ nCoeffString()
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition at line 972 of file coeffs.h.
◆ nCopyCoeff()
"copy" coeffs, i.e. increment ref
Definition at line 429 of file coeffs.h.
◆ nInitChar()
one-time initialisations for new coeffs in case of an error return NULL
Definition at line 349 of file numbers.cc.
421 Werror(
"Sorry: the coeff type [%d] was not registered: it is missing in nInitCharTable", (
int)t);
◆ nKillChar()
undo all initialisations
Definition at line 510 of file numbers.cc.
527 assume (r->cfKillChar!=
NULL); r->cfKillChar(r);
533 WarnS(
"cf_root list destroyed");
◆ nNew()
◆ nSetChar()
initialisations after each ring change
Definition at line 436 of file coeffs.h.
◆ number2mpz()
◆ fftable
const unsigned short fftable[] |
◆ rnumber_bin
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
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,...
static FORCE_INLINE void n_WriteLong(number n, const coeffs r)
write to the output buffer of the currently used reporter
void(* cfInpMult)(number &a, number b, const coeffs r)
Inplace: a *= b.
CanonicalForm(* convSingNFactoryN)(number n, BOOLEAN setChar, const coeffs r)
int(* cfSize)(number n, const coeffs r)
how complicated, (0) => 0, or positive
(mpz_ptr), see rmodulon,h
static void ndClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs r)
only used if HAVE_RINGS is defined
number(* cfGcd)(number a, number b, const coeffs r)
int(* cfDivComp)(number a, number b, const coeffs r)
static FORCE_INLINE number n_Random(siRandProc p, number p1, number p2, const coeffs cf)
static void ndClearDenominators(ICoeffsEnumerator &, number &d, const coeffs r)
number(* cfInpNeg)(number a, const coeffs r)
changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the...
static BOOLEAN ndDivBy(number, number, const coeffs)
static number ndConvFactoryNSingN(const CanonicalForm, const coeffs)
[in, out] a bigint number >= 0
static FORCE_INLINE number n_XExtGcd(number a, number b, number *s, number *t, number *u, number *v, const coeffs r)
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
static FORCE_INLINE int n_ParDeg(number n, const coeffs r)
number(* cfGetDenom)(number &n, const coeffs r)
int iNumberOfParameters
Number of Parameters in the coeffs (default 0)
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 ...
static void ndSetChar(const coeffs)
int(* cfParDeg)(number x, const coeffs r)
degree for coeffcients: -1 for 0, 0 for "constants", ...
void(* cfWriteShort)(number a, const coeffs r)
print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2
static BOOLEAN ndCoeffIsEqual(const coeffs r, n_coeffType n, void *)
char *(* cfCoeffName)(const coeffs r)
default name of cf, should substitue cfCoeffWrite, cfCoeffString
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
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
complex floating point (GMP) numbers
static number ndReturn0(number, const coeffs r)
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)
static BOOLEAN ndIsUnit(number a, const coeffs r)
static FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static char * ndCoeffString(const coeffs r)
only used if HAVE_RINGS is defined
void(* cfCoeffWrite)(const coeffs r, BOOLEAN details)
output of coeff description via Print
static int ndParDeg(number n, const coeffs r)
static number ndParameter(const int, const coeffs r)
static number ndIntMod(number, number, const coeffs r)
number(* cfRePart)(number a, const coeffs r)
BOOLEAN(* cfDBTest)(number a, const char *f, const int l, const coeffs r)
Test: is "a" a correct number?
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static number ndQuotRem(number a, number b, number *r, const coeffs R)
only used if HAVE_RINGS is defined
static const FORCE_INLINE char * n_Read(const char *s, number *a, const coeffs r)
!!! Recommendation: This method is too cryptic to be part of the user- !!! interface....
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
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....
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 l...
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
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 i...
BOOLEAN(* cfGreater)(number a, number b, const coeffs r)
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE number n_QuotRem(number a, number b, number *q, const coeffs r)
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,...
real floating point (GMP) numbers
number(* cfInit)(long i, const coeffs r)
init with an integer
static number ndGetDenom(number &, const coeffs r)
void(* cfDelete)(number *a, const coeffs r)
(fraction), see transext.h
static void ndInpMult(number &a, number b, const coeffs r)
static FORCE_INLINE void n_CoeffWrite(const coeffs r, BOOLEAN details=TRUE)
output the coeff description
static int ndDivComp(number, number, const coeffs)
CanonicalForm n_convSingNFactoryN(number n, BOOLEAN setChar, const coeffs r)
void(* cfPower)(number a, int i, number *result, const coeffs r)
const char *(* cfRead)(const char *s, number *a, const coeffs r)
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
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
used to represent polys as coeffcients
static number ndInitMPZ(mpz_t m, 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
long(* cfInt)(number &n, const coeffs r)
convertion to long, 0 if impossible
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
number(* cfGetUnit)(number a, const coeffs r)
void(* cfMPZ)(mpz_t result, number &n, const coeffs r)
Converts a non-negative number n into a GMP number, 0 if impossible.
#define omFreeSize(addr, size)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
number(* cfGetNumerator)(number &n, const coeffs r)
BOOLEAN(*)(*)(*) cfIsZero(number a, const coeffs r)
static FORCE_INLINE number n_RePart(number i, const coeffs cf)
nCoeffsEnumeratorFunc cfClearDenominators
function pointer behind n_ClearDenominators
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
static char * ndCoeffName(const coeffs r)
void(* cfInpAdd)(number &a, number b, const coeffs r)
Inplace: a += b.
number(* cfInvers)(number a, const coeffs r)
return 1/a
number(* cfInitMPZ)(mpz_t i, const coeffs r)
init with a GMP integer
void(* cfWriteLong)(number a, const coeffs r)
print a given number (long format)
number ndGcd(number, number, const coeffs r)
static number ndAnn(number, const coeffs)
BOOLEAN(*)(*)(*)(*)(*)(*) cfGreaterZero(number a, const coeffs r)
number(* cfSubringGcd)(number a, number b, const coeffs r)
only used if HAVE_RINGS is defined
nMapFunc(* cfSetMap)(const coeffs src, const coeffs dst)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
number(* cfCopy)(number a, const coeffs r)
return a copy of a
number(* cfImPart)(number a, const coeffs r)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static void ndKillChar(coeffs)
const char ** pParameterNames
array containing the names of Parameters (default NULL)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
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)
char *(* cfCoeffString)(const coeffs r)
string output of coeff description
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
number(* cfQuotRem)(number a, number b, number *rem, const coeffs r)
void(* cfSetChar)(const coeffs r)
static number ndCopy(number a, const coeffs)
static FORCE_INLINE number n_Farey(number a, number b, const coeffs r)
static void ndDelete(number *d, const coeffs)
single prescision (6,6) real numbers
number n_convFactoryNSingN(const CanonicalForm n, const coeffs r)
static FORCE_INLINE const char ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
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,...
nCoeffsEnumeratorFunc cfClearContent
function pointer behind n_ClearContent
static FORCE_INLINE int n_DivComp(number a, number b, const coeffs r)
BOOLEAN(*)(*) cfEqual(number a, number b, const coeffs r)
tests
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,...
static number ndInvers(number a, const coeffs r)
static FORCE_INLINE number n_ImPart(number i, const coeffs cf)
static FORCE_INLINE number n_EucNorm(number a, const coeffs r)
number(* cfNormalizeHelper)(number a, number b, const coeffs r)
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 ...
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
void StringSetS(const char *st)
static void ndNormalize(number &, const coeffs)
static FORCE_INLINE void n_WriteFd(number a, FILE *f, const coeffs r)
io via ssi:
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 d...
BOOLEAN(*)(*)(*)(*) cfIsOne(number a, const coeffs r)
number(* cfAnn)(number a, const coeffs r)
void Werror(const char *fmt,...)
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.
void(* cfNormalize)(number &a, const coeffs r)
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),...
number(* cfExtGcd)(number a, number b, number *s, number *t, const coeffs r)
static int ndSize(number a, const coeffs r)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
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,...
BOOLEAN(* cfIsUnit)(number a, const coeffs r)
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:...
static FORCE_INLINE number n_ChineseRemainderSym(number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
number(* cfParameter)(const int i, const coeffs r)
create i^th parameter or NULL if not possible
static FORCE_INLINE char * nCoeffName(const coeffs cf)
void nKillChar(coeffs r)
undo all initialisations
static void ndPower(number a, int i, number *res, const coeffs r)
number(* cfFarey)(number p, number n, const coeffs)
rational reconstruction: "best" rational a/b with a/b = p mod n
static void ndInpAdd(number &a, number b, const coeffs r)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
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 ....
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
const Variable & v
< [in] a sqrfree bivariate poly
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.
number(* cfLcm)(number a, number b, const coeffs r)
void(* cfKillChar)(coeffs r)
number(* convFactoryNSingN)(const CanonicalForm n, const coeffs r)
conversion to CanonicalForm(factory) to number
const CanonicalForm int s
CanonicalForm ndConvSingNFactoryN(number, BOOLEAN, const coeffs)
static cfInitCharProc * nInitCharTable
static number ndExtGcd(number, number, number *, number *, const coeffs r)
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 exceptio...
static number ndFarey(number, number, const coeffs r)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static number ndChineseRemainder(number *, number *, int, BOOLEAN, CFArray &, const coeffs r)
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 fo...
BOOLEAN(* cfDivBy)(number a, number b, const coeffs r)
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
number(* cfChineseRemainder)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs)
chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1
BOOLEAN(* nCoeffIsEqual)(const coeffs r, n_coeffType n, void *parameter)
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
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)
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 unexpec...
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.
static FORCE_INLINE coeffs n_CoeffRingQuot1(number c, const coeffs r)
static FORCE_INLINE number n_ReadFd(s_buff f, const coeffs r)
io via ssi:
static number ndGetNumerator(number &a, const coeffs r)
(gmp_complex), see gnumpc.h
static BOOLEAN ndDBTest(number, const char *, const int, const coeffs)
static n_coeffType nLastCoeffs
BOOLEAN(*)(*)(*)(*)(*) cfIsMOne(number a, const coeffs r)
static void ndMPZ(mpz_t result, number &n, const coeffs r)
Converts a non-negative bigint number into a GMP number.
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
(), see rinteger.h, new impl.