![]() |
My Project
|
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"
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) |
#define | ALLOC_RNUMBER() |
#define | ALLOC0_RNUMBER() |
#define | n_Test(a, r) |
BOOLEAN n_Test(number a, const coeffs r) | |
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 | |
typedef IEnumerator< number > | ICoeffsEnumerator |
Abstract interface for an enumerator of number coefficients for an object, e.g. a polynomial. | |
typedef void(* | nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r) |
goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number; | |
Enumerations | |
enum | n_coeffType { n_unknown =0 , n_Zp =1 , n_Q =2 , n_R =3 , n_GF =4 , n_long_R =5 , n_polyExt =6 , n_algExt =7 , n_transExt =8 , n_long_C =9 , n_nTupel =10 , n_Z =11 , n_Zn =12 , n_Znm =13 , n_Z2m =14 , n_FlintQrat =15 , n_CF =16 , n_Nemo_AnticNumberField =17 , n_Nemo_QQField =18 , n_Nemo_ZZRing =19 , n_Nemo_FqPolyRepField =20 , n_Nemo_fqPolyRepField =21 , n_Nemo_Field =22 , n_Nemo_Ring =23 } |
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. | |
coeffs | nInitChar (n_coeffType t, void *parameter) |
one-time initialisations for new coeffs in case of an error return NULL | |
static FORCE_INLINE coeffs | nCopyCoeff (const coeffs r) |
"copy" coeffs, i.e. increment ref | |
void | nKillChar (coeffs r) |
undo all initialisations | |
static FORCE_INLINE void | nSetChar (const coeffs r) |
initialisations after each ring change | |
static FORCE_INLINE int | n_GetChar (const coeffs r) |
Return the characteristic of the coeff. domain. | |
static FORCE_INLINE number | n_Copy (number n, const coeffs r) |
return a copy of 'n' | |
static FORCE_INLINE void | n_Delete (number *p, const coeffs r) |
delete 'p' | |
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. | |
static FORCE_INLINE BOOLEAN | n_IsZero (number n, const coeffs r) |
TRUE iff 'n' represents the zero element. | |
static FORCE_INLINE BOOLEAN | n_IsOne (number n, const coeffs r) |
TRUE iff 'n' represents the one element. | |
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. | |
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 | |
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 | |
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 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 | |
static FORCE_INLINE number | n_Init (long i, const coeffs r) |
a number representing i in the given coeff field/ring r | |
static FORCE_INLINE number | n_InitMPZ (mpz_t n, const coeffs r) |
conversion of a GMP integer to number | |
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] | |
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_InpNeg (number n, const coeffs r) |
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned) | |
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 | |
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) | |
static FORCE_INLINE void | n_Normalize (number &n, const coeffs r) |
inplace-normalization of n; produces some canonical representation of n; | |
static FORCE_INLINE void | n_WriteLong (number n, const coeffs r) |
write to the output buffer of the currently used reporter | |
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 | |
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. | |
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_GetNumerator (number &n, const coeffs r) |
return the numerator of n (if elements of r are by nature not fractional, result is n) | |
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 | |
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. | |
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 | |
static FORCE_INLINE void | n_Power (number a, int b, number *res, const coeffs r) |
fill res with the power a^b | |
static FORCE_INLINE number | n_Mult (number a, number b, const coeffs r) |
return the product of 'a' and 'b', i.e., a*b | |
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 void | n_InpAdd (number &a, number b, const coeffs r) |
addition of 'a' and 'b'; replacement of 'a' by the sum a+b | |
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 number | n_Sub (number a, number b, const coeffs r) |
return the difference of 'a' and 'b', i.e., a-b | |
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 | |
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... | |
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 | |
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 | |
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) | |
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 | |
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 | |
static FORCE_INLINE void | n_CoeffWrite (const coeffs r, BOOLEAN details=TRUE) |
output the coeff description | |
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) | |
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)) | |
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. | |
static FORCE_INLINE char const ** | n_ParameterNames (const coeffs r) |
Returns a (const!) pointer to (const char*) names 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..n_NumberOfParameters(...) | |
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 | |
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. | |
static FORCE_INLINE BOOLEAN | nCoeff_has_simple_Alloc (const coeffs r) |
TRUE if n_Delete is empty operation. | |
static FORCE_INLINE BOOLEAN | nCoeff_is_algExt (const coeffs r) |
TRUE iff r represents an algebraic extension field. | |
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_algExt (const coeffs r) |
is it an alg. ext. of Q? | |
static FORCE_INLINE BOOLEAN | nCoeff_is_transExt (const coeffs r) |
TRUE iff r represents a transcendental extension field. | |
static FORCE_INLINE BOOLEAN | nCoeff_is_Q_transExt (const coeffs r) |
is it an trans. ext. of Q? | |
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. | |
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 | |
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 | |
static FORCE_INLINE char * | nCoeffString (const coeffs cf) |
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar. | |
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: | |
static FORCE_INLINE number | n_ReadFd (const ssiInfo *f, const coeffs r) |
io via ssi: | |
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) |
Variables | |
const unsigned short | fftable [] |
EXTERN_VAR 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 |
struct n_Procs_s |
Data Fields | ||
---|---|---|
numberfunc | cfAdd | |
number(*)(number a, const coeffs r) | cfAnn | |
number(*)(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs) | cfChineseRemainder | chinese remainder returns X with X mod q[i]=x[i], i=0..rl-1 |
nCoeffsEnumeratorFunc | cfClearContent | function pointer behind n_ClearContent |
nCoeffsEnumeratorFunc | cfClearDenominators | function pointer behind n_ClearDenominators |
char *(*)(const coeffs r) | cfCoeffName | default name of cf, should substitute cfCoeffWrite, cfCoeffString |
char *(*)(const coeffs r) | cfCoeffString | string output of coeff description |
void(*)(const coeffs r, BOOLEAN details) | cfCoeffWrite | output of coeff description via Print |
number(*)(number a, const coeffs r) | cfCopy | return a copy of a |
BOOLEAN(*)(number a, const char *f, const int l, const coeffs r) | cfDBTest | Test: is "a" a correct number? |
void(*)(number *a, const coeffs r) | cfDelete | |
numberfunc | cfDiv | |
BOOLEAN(*)(number a, number b, const coeffs r) | cfDivBy | test if b divides a cfDivBy(zero,b,r) is true, if b is a zero divisor |
int(*)(number a, number b, const coeffs r) | cfDivComp | |
BOOLEAN(*)(number a, number b, const coeffs r) | cfEqual | tests |
number(*)(number a, const coeffs r) | cfEucNorm | |
numberfunc | cfExactDiv | |
number(*)(number a, number b, number *s, number *t, const coeffs r) | cfExtGcd | |
number(*)(number p, number n, const coeffs) | cfFarey | rational reconstruction: "best" rational a/b with a/b = p mod n |
number(*)(number a, number b, const coeffs r) | cfGcd | |
number(*)(number &n, const coeffs r) | cfGetDenom | |
number(*)(number &n, const coeffs r) | cfGetNumerator | |
number(*)(number a, const coeffs r) | cfGetUnit | |
BOOLEAN(*)(number a, number b, const coeffs r) | cfGreater | |
BOOLEAN(*)(number a, const coeffs r) | cfGreaterZero | |
number(*)(number a, const coeffs r) | cfImPart | |
number(*)(long i, const coeffs r) | cfInit | init with an integer |
number(*)(mpz_t i, const coeffs r) | cfInitMPZ | init with a GMP integer |
void(*)(number &a, number b, const coeffs r) | cfInpAdd | Inplace: a += b. |
void(*)(number &a, number b, const coeffs r) | cfInpMult | Inplace: a *= b. |
number(*)(number a, const coeffs r) | cfInpNeg | changes argument inline: a:= -a return -a! (no copy is returned) the result should be assigned to the original argument: e.g. a = n_InpNeg(a,r) |
long(*)(number &n, const coeffs r) | cfInt | conversion to long, 0 if impossible |
numberfunc | cfIntMod | |
number(*)(number a, const coeffs r) | cfInvers | return 1/a |
BOOLEAN(*)(number a, const coeffs r) | cfIsMOne | |
BOOLEAN(*)(number a, const coeffs r) | cfIsOne | |
BOOLEAN(*)(number a, const coeffs r) | cfIsUnit | |
BOOLEAN(*)(number a, const coeffs r) | cfIsZero | |
void(*)(coeffs r) | cfKillChar | |
number(*)(number a, number b, const coeffs r) | cfLcm | |
void(*)(mpz_t result, number &n, const coeffs r) | cfMPZ | Converts a (integer) number n into a GMP number, 0 if impossible. |
numberfunc | cfMult | |
void(*)(number &a, const coeffs r) | cfNormalize | |
number(*)(number a, number b, const coeffs r) | cfNormalizeHelper | |
number(*)(const int i, const coeffs r) | cfParameter | create i^th parameter or NULL if not possible |
int(*)(number x, const coeffs r) | cfParDeg | degree for coefficients: -1 for 0, 0 for "constants", ... |
void(*)(number a, int i, number *result, const coeffs r) | cfPower | |
coeffs(*)(number c, const coeffs r) | cfQuot1 | |
number(*)(number a, number b, number *rem, const coeffs r) | cfQuotRem | |
number(*)(siRandProc p, number p1, number p2, const coeffs cf) | cfRandom | a function returning random elements |
const char *(*)(const char *s, number *a, const coeffs r) | cfRead | |
number(*)(const ssiInfo *f, const coeffs r) | cfReadFd | |
number(*)(number a, const coeffs r) | cfRePart | |
void(*)(const coeffs r) | cfSetChar | |
nMapFunc(*)(const coeffs src, const coeffs dst) | cfSetMap | |
int(*)(number n, const coeffs r) | cfSize | how complicated, (0) => 0, or positive |
numberfunc | cfSub | |
number(*)(number a, number b, const coeffs r) | cfSubringGcd | |
void(*)(number a, const ssiInfo *f, const coeffs r) | cfWriteFd | |
void(*)(number a, const coeffs r) | cfWriteLong | print a given number (long format) |
void(*)(number a, const coeffs r) | cfWriteShort | print a given number in a shorter way, if possible e.g. in K(a): a2 instead of a^2 |
number(*)(number a, number b, number *s, number *t, number *u, number *v, const coeffs r) | cfXExtGcd | |
int | ch | |
number(*)(const CanonicalForm n, const coeffs r) | convFactoryNSingN | conversion to CanonicalForm(factory) to number |
CanonicalForm(*)(number n, BOOLEAN setChar, const coeffs r) | convSingNFactoryN | |
void * | data | |
ring | extRing | |
int | factoryVarOffset | how many variables of factory are already used by this coeff |
short | float_len | |
short | float_len2 | |
BOOLEAN | has_simple_Alloc | TRUE, if nDelete/nCopy are dummies. |
BOOLEAN | has_simple_Inverse | TRUE, if std should make polynomials monic (if nInvers is cheap) if false, then a gcd routine is used for a content computation. |
int | iNumberOfParameters | Number of Parameters in the coeffs (default 0) |
BOOLEAN | is_domain | TRUE, if cf is a domain. |
BOOLEAN | is_field | TRUE, if cf is a field. |
int | m_nfCharP | the characteristic: p |
int | m_nfCharQ | the number of elements: q |
int | m_nfCharQ1 | q-1 |
int | m_nfM1 | representation of -1 |
int * | m_nfMinPoly | |
unsigned short * | m_nfPlus1Table | |
unsigned long | mod2mMask | |
mpz_ptr | modBase | |
unsigned long | modExponent | |
mpz_ptr | modNumber | |
BOOLEAN(*)(const coeffs r, n_coeffType n, void *parameter) | nCoeffIsEqual | |
coeffs | next | |
unsigned short * | npExpTable | |
unsigned short * | npInvTable | |
unsigned short * | npLogTable | |
int | npPminus1M | characteristic - 1 |
char const ** | pParameterNames | array containing the names of Parameters (default NULL) |
int | ref | |
n_coeffRep | rep | |
n_coeffType | type |
#define ALLOC0_RNUMBER | ( | ) |
#define ALLOC_RNUMBER | ( | ) |
#define FREE_RNUMBER | ( | x | ) |
#define n_Test | ( | a, | |
r ) |
typedef IEnumerator<number> ICoeffsEnumerator |
typedef void(* nCoeffsEnumeratorFunc) (ICoeffsEnumerator &numberCollectionEnumerator, number &output, const coeffs r) |
goes over coeffs given by the ICoeffsEnumerator and changes them. Additionally returns a number;
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 |
enum n_coeffType |
Definition at line 26 of file coeffs.h.
|
static |
|
static |
Definition at line 985 of file coeffs.h.
|
static |
|
static |
|
static |
|
static |
Definition at line 941 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.
|
static |
Definition at line 944 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
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
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' always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a
|
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 748 of file coeffs.h.
|
static |
|
static |
|
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.
|
static |
beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpected in some cases...
|
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
|
static |
|
static |
|
static |
|
static |
|
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
|
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 -
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1..n_NumberOfParameters(...)
Definition at line 776 of file coeffs.h.
|
static |
|
static |
|
static |
print a number (BEWARE of string buffers!) mostly for debugging
Definition at line 655 of file numbers.cc.
|
static |
|
static |
|
static |
|
static |
|
static |
set the mapping function pointers for translating numbers from src to dst
|
static |
|
static |
|
static |
|
static |
Definition at line 592 of file coeffs.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
returns TRUE, if r is not a field and r has non-trivial units
Definition at line 790 of file coeffs.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 825 of file coeffs.h.
|
static |
|
static |
Definition at line 878 of file coeffs.h.
|
static |
is it an alg. ext. of Q?
Definition at line 907 of file coeffs.h.
|
static |
|
static |
is it an trans. ext. of Q?
Definition at line 915 of file coeffs.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 287 of file numbers.cc.
coeffs nInitChar | ( | n_coeffType | t, |
void * | parameter ) |
one-time initialisations for new coeffs in case of an error return NULL
Definition at line 406 of file numbers.cc.
void nKillChar | ( | coeffs | r | ) |
undo all initialisations
Definition at line 556 of file numbers.cc.
|
static |
|
static |
|
extern |
Definition at line 27 of file ffields.cc.
EXTERN_VAR omBin rnumber_bin |