![]() |
Coefficient rings, fields and other domains suitable for Singular polynomials. More...
#include <misc/auxiliary.h>
#include <omalloc/omalloc.h>
#include <misc/sirandom.h>
#include <reporter/reporter.h>
#include <reporter/s_buff.h>
#include <factory/factory.h>
#include <coeffs/si_gmp.h>
#include <coeffs/Enumerator.h>
#include <coeffs/numstats.h>
Go to the source code of this file.
Data Structures | |
struct | GFInfo |
Creation data needed for finite fields. More... | |
struct | LongComplexInfo |
struct | coeffs |
Macros | |
#define | FREE_RNUMBER(x) omFreeBin((void *)x, rnumber_bin) |
#define | ALLOC_RNUMBER() (number)omAllocBin(rnumber_bin) |
#define | ALLOC0_RNUMBER() (number)omAlloc0Bin(rnumber_bin) |
#define | n_New(n, r) nNew(n) |
#define | n_Test(a, r) n_DBTest(a, __FILE__, __LINE__, r) |
BOOLEAN n_Test(number a, const coeffs r) More... | |
Typedefs | |
typedef number(* | numberfunc) (number a, number b, const coeffs r) |
typedef number(* | nMapFunc) (number a, const coeffs src, const coeffs dst) |
maps "a", which lives in src, into dst More... | |
typedef IEnumerator< number > | ICoeffsEnumerator |
Abstract interface for an enumerator of number coefficients for an object, e.g. a polynomial. More... | |
typedef void(* | nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r) |
goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number; More... | |
Enumerations | |
enum | n_coeffType { n_unknown =0, n_Zp, n_Q, n_R, n_GF, n_long_R, n_algExt, n_transExt, n_long_C, 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 } |
Functions | |
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 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' 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) otherwise: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a 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 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_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) |
Variables | |
unsigned short | fftable [] |
omBin | rnumber_bin |
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.
struct GFInfo |
struct LongComplexInfo |
#define ALLOC0_RNUMBER | ( | ) | (number)omAlloc0Bin(rnumber_bin) |
#define ALLOC_RNUMBER | ( | ) | (number)omAllocBin(rnumber_bin) |
BOOLEAN n_Test(number a, const coeffs r)
typedef IEnumerator<number> ICoeffsEnumerator |
typedef void(* nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r) |
enum 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 106 of file coeffs.h.
enum n_coeffType |
Definition at line 27 of file coeffs.h.
|
static |
|
static |
Definition at line 992 of file coeffs.h.
|
static |
return the sum of 'a' and 'b', i.e., a+b
|
static |
if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL
Definition at line 700 of file coeffs.h.
|
static |
Definition at line 782 of file coeffs.h.
|
static |
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 932 of file coeffs.h.
|
static |
Definition at line 948 of file coeffs.h.
|
static |
(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 939 of file coeffs.h.
|
static |
Definition at line 951 of file coeffs.h.
|
static |
Definition at line 519 of file coeffs.h.
|
static |
output the coeff description
Definition at line 737 of file coeffs.h.
number n_convFactoryNSingN | ( | const CanonicalForm | n, |
const coeffs | r | ||
) |
Definition at line 560 of file numbers.cc.
CanonicalForm n_convSingNFactoryN | ( | number | n, |
BOOLEAN | setChar, | ||
const coeffs | r | ||
) |
Definition at line 565 of file numbers.cc.
|
static |
return a copy of 'n'
Definition at line 452 of file coeffs.h.
|
static |
|
static |
delete 'p'
Definition at line 456 of file coeffs.h.
|
static |
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'
Definition at line 615 of file coeffs.h.
|
static |
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 771 of file coeffs.h.
|
static |
|
static |
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
|
static |
|
static |
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.
|
static |
beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases...
Definition at line 692 of file coeffs.h.
|
static |
|
static |
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 685 of file coeffs.h.
|
static |
Return the characteristic of the coeff. domain.
Definition at line 445 of file coeffs.h.
|
static |
return the denominator of n (if elements of r are by nature not fractional, result is 1)
Definition at line 604 of file coeffs.h.
|
static |
return the numerator of n (if elements of r are by nature not fractional, result is n)
Definition at line 609 of file coeffs.h.
|
static |
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
|
static |
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 512 of file coeffs.h.
|
static |
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 495 of file coeffs.h.
: 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
|
static |
|
static |
a number representing i in the given coeff field/ring r
Definition at line 539 of file coeffs.h.
|
static |
conversion of a GMP integer to number
|
static |
addition of 'a' and 'b'; replacement of 'a' by the sum a+b
Definition at line 645 of file coeffs.h.
|
static |
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
Definition at line 640 of file coeffs.h.
|
static |
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition at line 558 of file coeffs.h.
|
static |
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 548 of file coeffs.h.
|
static |
for r a field, return n_Init(0,r) otherwise: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
Definition at line 627 of file coeffs.h.
|
static |
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible
!!! Recommendation: rename to 'n_Inverse'
Definition at line 565 of file coeffs.h.
|
static |
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
Definition at line 473 of file coeffs.h.
|
static |
TRUE iff 'n' represents the one element.
Definition at line 469 of file coeffs.h.
|
static |
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
Definition at line 516 of file coeffs.h.
|
static |
TRUE iff 'n' represents the zero element.
Definition at line 465 of file coeffs.h.
|
static |
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 711 of file coeffs.h.
|
static |
conversion of n to a GMP integer; 0 if not possible
Definition at line 552 of file coeffs.h.
|
static |
return the product of 'a' and 'b', i.e., a*b
Definition at line 635 of file coeffs.h.
|
static |
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 579 of file coeffs.h.
|
static |
assume that r is a quotient field (otherwise, return 1) for arguments (a1/a2,b1/b2) return (lcm(a1,b2)/1)
Definition at line 716 of file coeffs.h.
|
static |
Returns the number of parameters.
Definition at line 792 of file coeffs.h.
|
static |
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...)
Definition at line 801 of file coeffs.h.
|
static |
Returns a (const!) pointer to (const char*) names of parameters.
Definition at line 796 of file coeffs.h.
|
static |
|
static |
fill res with the power a^b
Definition at line 631 of file coeffs.h.
print a number (BEWARE of string buffers!) mostly for debugging
Definition at line 549 of file numbers.cc.
|
static |
|
static |
|
static |
!!! 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 599 of file coeffs.h.
|
static |
|
static |
set the mapping function pointers for translating numbers from src to dst
|
static |
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 571 of file coeffs.h.
|
static |
return the difference of 'a' and 'b', i.e., a-b
|
static |
|
static |
Definition at line 592 of file coeffs.h.
|
static |
|
static |
write to the output buffer of the currently used reporter
Definition at line 584 of file coeffs.h.
|
static |
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 589 of file coeffs.h.
|
static |
|
static |
|
static |
|
static |
returns TRUE, if r is not a field and r has non-trivial units
Definition at line 815 of file coeffs.h.
|
static |
TRUE iff r represents an algebraic extension field.
Definition at line 911 of file coeffs.h.
|
static |
Definition at line 898 of file coeffs.h.
|
static |
|
static |
Definition at line 844 of file coeffs.h.
|
static |
Definition at line 837 of file coeffs.h.
|
static |
Definition at line 840 of file coeffs.h.
|
static |
Definition at line 895 of file coeffs.h.
|
static |
Definition at line 892 of file coeffs.h.
|
static |
Definition at line 830 of file coeffs.h.
|
static |
Definition at line 824 of file coeffs.h.
|
static |
Definition at line 883 of file coeffs.h.
|
static |
is it an alg. ext. of Q?
Definition at line 915 of file coeffs.h.
|
static |
Definition at line 827 of file coeffs.h.
|
static |
Definition at line 834 of file coeffs.h.
|
static |
|
static |
Definition at line 741 of file coeffs.h.
|
static |
Definition at line 744 of file coeffs.h.
|
static |
Definition at line 747 of file coeffs.h.
|
static |
Definition at line 750 of file coeffs.h.
|
static |
TRUE iff r represents a transcendental extension field.
Definition at line 919 of file coeffs.h.
|
static |
Definition at line 818 of file coeffs.h.
|
static |
Definition at line 821 of file coeffs.h.
|
static |
Definition at line 857 of file coeffs.h.
|
static |
Definition at line 870 of file coeffs.h.
|
static |
|
static |
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition at line 963 of file coeffs.h.
|
static |
coeffs nInitChar | ( | n_coeffType | t, |
void * | parameter | ||
) |
one-time initialisations for new coeffs in case of an error return NULL
Definition at line 327 of file numbers.cc.
void nKillChar | ( | coeffs | r | ) |
undo all initialisations
Definition at line 488 of file numbers.cc.
void nNew | ( | number * | a | ) |
Definition at line 49 of file numbers.cc.
|
static |
initialisations after each ring change
Definition at line 437 of file coeffs.h.
|
static |
Definition at line 991 of file coeffs.h.
unsigned short fftable[] |
Definition at line 61 of file ffields.cc.
omBin rnumber_bin |
Definition at line 23 of file longrat0.cc.