 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
Go to the source code of this file.
|
static number | nrzMult (number a, number b, const coeffs) |
|
static number | nrzLcm (number a, number b, const coeffs) |
|
static number | nrzGcd (number a, number b, const coeffs) |
|
static number | nrzExtGcd (number a, number b, number *s, number *t, const coeffs) |
|
static number | nrzXExtGcd (number a, number b, number *s, number *t, number *u, number *v, const coeffs) |
|
static void | nrzPower (number a, int i, number *result, const coeffs) |
|
number | nrzInit (long i, const coeffs) |
|
static void | nrzDelete (number *a, const coeffs) |
|
static number | nrzCopy (number a, const coeffs) |
|
static int | nrzSize (number a, const coeffs) |
|
static long | nrzInt (number &n, const coeffs) |
|
static number | nrzAdd (number a, number b, const coeffs) |
|
static number | nrzSub (number a, number b, const coeffs) |
|
static number | nrzGetUnit (number, const coeffs r) |
|
static BOOLEAN | nrzIsUnit (number a, const coeffs) |
|
static BOOLEAN | nrzIsZero (number a, const coeffs) |
|
static BOOLEAN | nrzIsOne (number a, const coeffs) |
|
static BOOLEAN | nrzIsMOne (number a, const coeffs) |
|
static BOOLEAN | nrzEqual (number a, number b, const coeffs) |
|
static BOOLEAN | nrzGreater (number a, number b, const coeffs) |
|
static BOOLEAN | nrzGreaterZero (number k, const coeffs) |
|
static BOOLEAN | nrzDivBy (number a, number b, const coeffs) |
|
static int | nrzDivComp (number a, number b, const coeffs r) |
|
static number | nrzDiv (number a, number b, const coeffs) |
|
static number | nrzExactDiv (number a, number b, const coeffs) |
|
static number | nrzQuotRem (number a, number b, number *r, const coeffs) |
|
static number | nrzIntMod (number a, number b, const coeffs) |
|
static number | nrzInvers (number c, const coeffs r) |
|
static number | nrzNeg (number c, const coeffs) |
|
static number | nrzMapMachineInt (number from, const coeffs, const coeffs) |
|
static number | nrzMapZp (number from, const coeffs, const coeffs) |
|
static number | nrzMapQ (number from, const coeffs src, const coeffs) |
|
static nMapFunc | nrzSetMap (const coeffs src, const coeffs) |
|
void | nrzSetExp (int, coeffs) |
|
void | nrzInitExp (int, coeffs) |
|
static BOOLEAN | nrzDBTest (number, const char *, const int, const coeffs) |
|
void | nrzWrite (number a, const coeffs) |
|
static const char * | nlEatLongC (char *s, mpz_ptr i) |
|
static CanonicalForm | nrzConvSingNFactoryN (number n, BOOLEAN setChar, const coeffs) |
|
static number | nrzConvFactoryNSingN (const CanonicalForm n, const coeffs r) |
|
static const char * | nrzRead (const char *s, number *a, const coeffs) |
|
static void | nrzCoeffWrite (const coeffs, BOOLEAN) |
|
static char * | nrzCoeffName (const coeffs) |
|
static char * | nrzCoeffString (const coeffs cf) |
|
static coeffs | nrzQuot1 (number c, const coeffs r) |
|
static number | nrzInitMPZ (mpz_t m, const coeffs) |
|
static number | nrzFarey (number r, number N, const coeffs R) |
|
BOOLEAN | nrzInitChar (coeffs r, void *) |
|
◆ nlEatLongC()
static const char* nlEatLongC |
( |
char * |
s, |
|
|
mpz_ptr |
i |
|
) |
| |
|
static |
Definition at line 406 of file rintegers.cc.
408 const char * start=
s;
410 if (*s<'0' || *s>
'9')
415 while (*
s >=
'0' && *
s <=
'9')
s++;
418 mpz_set_str(
i,start,10);
424 mpz_set_str(
i,start,10);
◆ nrzAdd()
static number nrzAdd |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 172 of file rintegers.cc.
176 mpz_add(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzCoeffName()
static char* nrzCoeffName |
( |
const |
coeffs | ) |
|
|
static |
◆ nrzCoeffString()
◆ nrzCoeffWrite()
◆ nrzConvFactoryNSingN()
◆ nrzConvSingNFactoryN()
◆ nrzCopy()
static number nrzCopy |
( |
number |
a, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 143 of file rintegers.cc.
147 mpz_init_set(erg, (mpz_ptr) a);
◆ nrzDBTest()
◆ nrzDelete()
static void nrzDelete |
( |
number * |
a, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 135 of file rintegers.cc.
137 if (*a ==
NULL)
return;
138 mpz_clear((mpz_ptr) *a);
◆ nrzDiv()
static number nrzDiv |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 244 of file rintegers.cc.
250 mpz_tdiv_qr(erg, r, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzDivBy()
static BOOLEAN nrzDivBy |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 228 of file rintegers.cc.
230 return mpz_divisible_p((mpz_ptr) a, (mpz_ptr)
b) != 0;
◆ nrzDivComp()
static int nrzDivComp |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
r |
|
) |
| |
|
static |
◆ nrzEqual()
static BOOLEAN nrzEqual |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 213 of file rintegers.cc.
215 return 0 == mpz_cmp((mpz_ptr) a, (mpz_ptr)
b);
◆ nrzExactDiv()
static number nrzExactDiv |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 261 of file rintegers.cc.
265 mpz_tdiv_q(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzExtGcd()
static number nrzExtGcd |
( |
number |
a, |
|
|
number |
b, |
|
|
number * |
s, |
|
|
number * |
t, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 72 of file rintegers.cc.
80 mpz_gcdext(erg, bs, bt, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzFarey()
static number nrzFarey |
( |
number |
r, |
|
|
number |
N, |
|
|
const coeffs |
R |
|
) |
| |
|
static |
◆ nrzGcd()
static number nrzGcd |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 60 of file rintegers.cc.
64 mpz_gcd(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzGetUnit()
◆ nrzGreater()
static BOOLEAN nrzGreater |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 218 of file rintegers.cc.
220 return 0 < mpz_cmp((mpz_ptr) a, (mpz_ptr)
b);
◆ nrzGreaterZero()
◆ nrzInit()
number nrzInit |
( |
long |
i, |
|
|
const |
coeffs |
|
) |
| |
◆ nrzInitChar()
◆ nrzInitExp()
void nrzInitExp |
( |
int |
, |
|
|
coeffs |
|
|
) |
| |
◆ nrzInitMPZ()
static number nrzInitMPZ |
( |
mpz_t |
m, |
|
|
const |
coeffs |
|
) |
| |
|
static |
◆ nrzInt()
static long nrzInt |
( |
number & |
n, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 167 of file rintegers.cc.
169 return mpz_get_si( (mpz_ptr)n);
◆ nrzIntMod()
static number nrzIntMod |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 288 of file rintegers.cc.
294 mpz_tdiv_qr(erg, r, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzInvers()
◆ nrzIsMOne()
Definition at line 208 of file rintegers.cc.
210 return (a!=
NULL) && (0 == mpz_cmp_si((mpz_ptr) a, -1));
◆ nrzIsOne()
Definition at line 203 of file rintegers.cc.
205 return (a!=
NULL) && (0 == mpz_cmp_ui((mpz_ptr) a, 1));
◆ nrzIsUnit()
Definition at line 193 of file rintegers.cc.
195 return 0 == mpz_cmpabs_ui((mpz_ptr) a, 1);
◆ nrzIsZero()
Definition at line 198 of file rintegers.cc.
200 return 0 == mpz_cmpabs_ui((mpz_ptr) a, 0);
◆ nrzLcm()
static number nrzLcm |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 48 of file rintegers.cc.
52 mpz_lcm(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzMapMachineInt()
static number nrzMapMachineInt |
( |
number |
from, |
|
|
const |
coeffs, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 317 of file rintegers.cc.
320 mpz_init_set_ui(erg, (
unsigned long) from);
◆ nrzMapQ()
◆ nrzMapZp()
static number nrzMapZp |
( |
number |
from, |
|
|
const |
coeffs, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 324 of file rintegers.cc.
327 mpz_init_set_si(erg, (
long) from);
◆ nrzMult()
static number nrzMult |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 37 of file rintegers.cc.
41 mpz_mul(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzNeg()
static number nrzNeg |
( |
number |
c, |
|
|
const |
coeffs |
|
) |
| |
|
static |
◆ nrzPower()
static void nrzPower |
( |
number |
a, |
|
|
int |
i, |
|
|
number * |
result, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 117 of file rintegers.cc.
121 mpz_pow_ui(erg, (mpz_ptr) a,
i);
◆ nrzQuot1()
Definition at line 480 of file rintegers.cc.
482 long ch = r->cfInt(c, r);
484 mpz_init_set_ui(dummy, ch);
487 info.exp = (
unsigned long) 1;
◆ nrzQuotRem()
static number nrzQuotRem |
( |
number |
a, |
|
|
number |
b, |
|
|
number * |
r, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 269 of file rintegers.cc.
275 mpz_tdiv_qr(qq, rr, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzRead()
◆ nrzSetExp()
void nrzSetExp |
( |
int |
, |
|
|
coeffs |
|
|
) |
| |
◆ nrzSetMap()
◆ nrzSize()
static int nrzSize |
( |
number |
a, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 158 of file rintegers.cc.
160 if (a ==
NULL)
return 0;
161 return (((mpz_ptr)a)->_mp_alloc);
◆ nrzSub()
static number nrzSub |
( |
number |
a, |
|
|
number |
b, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 180 of file rintegers.cc.
184 mpz_sub(erg, (mpz_ptr) a, (mpz_ptr)
b);
◆ nrzWrite()
void nrzWrite |
( |
number |
a, |
|
|
const |
coeffs |
|
) |
| |
Definition at line 386 of file rintegers.cc.
395 int l=mpz_sizeinbase((mpz_ptr) a, 10) + 2;
397 z=mpz_get_str(
s,10,(mpz_ptr) a);
◆ nrzXExtGcd()
static number nrzXExtGcd |
( |
number |
a, |
|
|
number |
b, |
|
|
number * |
s, |
|
|
number * |
t, |
|
|
number * |
u, |
|
|
number * |
v, |
|
|
const |
coeffs |
|
) |
| |
|
static |
Definition at line 86 of file rintegers.cc.
95 mpz_gcdext(erg, bs, bt, (mpz_ptr)a, (mpz_ptr)
b);
100 mpz_init_set(bu, (mpz_ptr)
b);
101 mpz_init_set(bv, (mpz_ptr) a);
103 assume(mpz_cmp_si(erg, 0));
105 mpz_div(bu, bu, erg);
106 mpz_div(bv, bv, erg);
◆ gmp_nrz_bin
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
@ n_rep_gmp
(mpz_ptr), see rmodulon,h
@ n_Zn
only used if HAVE_RINGS is defined
static number nrzCopy(number a, const coeffs)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
void StringAppendS(const char *st)
static number nrzInvers(number c, const coeffs r)
static number nrzDiv(number a, number b, const coeffs)
static number nrzMapQ(number from, const coeffs src, const coeffs)
static nMapFunc nrzSetMap(const coeffs src, const coeffs)
static number nrzFarey(number r, number N, const coeffs R)
static CanonicalForm nrzConvSingNFactoryN(number n, BOOLEAN setChar, const coeffs)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
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
number nlChineseRemainderSym(number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs CF)
static coeffs nrzQuot1(number c, const coeffs r)
static int nrzSize(number a, const coeffs)
static number nrzIntMod(number a, number b, const coeffs)
static BOOLEAN nrzGreater(number a, number b, const coeffs)
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static number nrzConvFactoryNSingN(const CanonicalForm n, const coeffs r)
static const char * nlEatLongC(char *s, mpz_ptr i)
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
@ n_Q
rational (GMP) numbers
CanonicalForm make_cf(const mpz_ptr n)
const CanonicalForm CFMap CFMap & N
static number nrzMapZp(number from, const coeffs, const coeffs)
static BOOLEAN nrzDBTest(number, const char *, const int, const coeffs)
static BOOLEAN nrzIsOne(number a, const coeffs)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_ModN(const coeffs r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static char * nrzCoeffString(const coeffs cf)
static number nrzGetUnit(number, const coeffs r)
void PrintS(const char *s)
#define omFreeSize(addr, size)
static BOOLEAN nrzGreaterZero(number k, const coeffs)
static BOOLEAN nrzEqual(number a, number b, const coeffs)
static number nrzExtGcd(number a, number b, number *s, number *t, const coeffs)
static number nrzAdd(number a, number b, const coeffs)
static void nrzCoeffWrite(const coeffs, BOOLEAN)
@ n_Z
only used if HAVE_RINGS is defined
static number nrzSub(number a, number b, const coeffs)
static number nrzNeg(number c, const coeffs)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
static number nrzMapMachineInt(number from, const coeffs, const coeffs)
static BOOLEAN nrzDivBy(number a, number b, const coeffs)
void n_Print(number &a, const coeffs r)
print a number (BEWARE of string buffers!) mostly for debugging
static BOOLEAN nrzIsZero(number a, const coeffs)
static long nrzInt(number &n, const coeffs)
static number nrzQuotRem(number a, number b, number *r, const coeffs)
void mpz_mul_si(mpz_ptr r, mpz_srcptr s, long int si)
static number nrzInitMPZ(mpz_t m, const coeffs)
static char * nrzCoeffName(const coeffs)
static int nrzDivComp(number a, number b, const coeffs r)
static BOOLEAN nrzIsMOne(number a, const coeffs)
static number nrzMult(number a, number b, const coeffs)
number nrzInit(long i, const coeffs)
static number nrzExactDiv(number a, number b, const coeffs)
void WerrorS(const char *s)
static const char * nrzRead(const char *s, number *a, const coeffs)
static void nrzDelete(number *a, const coeffs)
static number nrzXExtGcd(number a, number b, number *s, number *t, number *u, number *v, const coeffs)
static void nrzPower(number a, int i, number *result, const coeffs)
void gmp_numerator(const CanonicalForm &f, mpz_ptr result)
const Variable & v
< [in] a sqrfree bivariate poly
void nrzWrite(number a, const coeffs)
const CanonicalForm int s
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 FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
#define omFreeBin(addr, bin)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
const ExtensionInfo & info
< [in] sqrfree poly
static BOOLEAN nrzIsUnit(number a, const coeffs)
void nKillChar(coeffs r)
undo all initialisations
static number nrzLcm(number a, number b, const coeffs)
static number nrzGcd(number a, number b, const coeffs)
void nlGMP(number &i, mpz_t n, const coeffs r)
@ n_rep_gap_gmp
(), see rinteger.h, new impl.