 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the source code of this file.
|
static BOOLEAN | ntDBTest (number a, const char *f, const int l, const coeffs r) |
|
static void | heuristicGcdCancellation (number a, const coeffs cf) |
| forward declarations More...
|
|
static void | definiteGcdCancellation (number a, const coeffs cf, BOOLEAN simpleTestsHaveAlreadyBeenPerformed) |
| modifies a More...
|
|
static coeffs | nCoeff_bottom (const coeffs r, int &height) |
|
static BOOLEAN | ntIsZero (number a, const coeffs cf) |
|
static void | ntDelete (number *a, const coeffs cf) |
|
static BOOLEAN | ntEqual (number a, number b, const coeffs cf) |
|
static number | ntCopy (number a, const coeffs cf) |
|
static void | handleNestedFractionsOverQ (fraction f, const coeffs cf) |
|
static number | ntGetNumerator (number &a, const coeffs cf) |
| TODO: normalization of a!? More...
|
|
static number | ntGetDenom (number &a, const coeffs cf) |
| TODO: normalization of a!? More...
|
|
static BOOLEAN | ntIsOne (number a, const coeffs cf) |
|
static BOOLEAN | ntIsMOne (number a, const coeffs cf) |
|
static number | ntNeg (number a, const coeffs cf) |
| this is in-place, modifies a More...
|
|
number | ntInit (long i, const coeffs cf) |
|
number | ntInit (poly p, const coeffs cf) |
|
static long | ntInt (number &a, const coeffs cf) |
|
static BOOLEAN | ntGreaterZero (number a, const coeffs cf) |
|
static BOOLEAN | ntGreater (number a, number b, const coeffs cf) |
|
static void | ntCoeffWrite (const coeffs cf, BOOLEAN details) |
|
number | ntDiff (number a, number d, const coeffs cf) |
|
static number | ntAdd (number a, number b, const coeffs cf) |
|
static number | ntSub (number a, number b, const coeffs cf) |
|
static number | ntMult (number a, number b, const coeffs cf) |
|
static void | ntNormalizeDen (fraction result, const ring R) |
|
static number | ntDiv (number a, number b, const coeffs cf) |
|
static number | ntInvers (number a, const coeffs cf) |
|
static void | ntPower (number a, int exp, number *b, const coeffs cf) |
|
static void | ntWriteLong (number a, const coeffs cf) |
|
static void | ntWriteShort (number a, const coeffs cf) |
|
static const char * | ntRead (const char *s, number *a, const coeffs cf) |
|
static void | ntNormalize (number &a, const coeffs cf) |
|
static BOOLEAN | ntCoeffIsEqual (const coeffs cf, n_coeffType n, void *param) |
|
static number | ntNormalizeHelper (number a, number b, const coeffs cf) |
|
static number | ntGcd (number a, number b, const coeffs cf) |
|
static int | ntSize (number a, const coeffs cf) |
|
static number | ntMap00 (number a, const coeffs src, const coeffs dst) |
|
static number | ntMapZ0 (number a, const coeffs src, const coeffs dst) |
|
static number | ntMapP0 (number a, const coeffs src, const coeffs dst) |
|
static number | ntCopyMap (number a, const coeffs cf, const coeffs dst) |
|
static number | ntGenMap (number a, const coeffs cf, const coeffs dst) |
|
static number | ntCopyAlg (number a, const coeffs cf, const coeffs dst) |
|
static number | ntGenAlg (number a, const coeffs cf, const coeffs dst) |
|
static number | ntMap0P (number a, const coeffs src, const coeffs dst) |
|
static number | ntMapPP (number a, const coeffs src, const coeffs dst) |
|
static number | ntMapUP (number a, const coeffs src, const coeffs dst) |
|
nMapFunc | ntSetMap (const coeffs src, const coeffs dst) |
| Get a mapping function from src into the domain of this type (n_transExt) More...
|
|
static void | ntKillChar (coeffs cf) |
|
static number | ntConvFactoryNSingN (const CanonicalForm n, const coeffs cf) |
|
static CanonicalForm | ntConvSingNFactoryN (number n, BOOLEAN, const coeffs cf) |
|
static int | ntParDeg (number a, const coeffs cf) |
|
static number | ntParameter (const int iParameter, const coeffs cf) |
| return the specified parameter as a number in the given trans.ext. More...
|
|
int | ntIsParam (number m, const coeffs cf) |
| if m == var(i)/1 => return i, More...
|
|
static void | ntClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf) |
|
static void | ntClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf) |
|
static number | ntChineseRemainder (number *x, number *q, int rl, BOOLEAN, CFArray &inv_cache, const coeffs cf) |
|
static number | ntFarey (number p, number n, const coeffs cf) |
|
BOOLEAN | ntInitChar (coeffs cf, void *infoStruct) |
| Initialize the coeffs object. More...
|
|
◆ ADD_COMPLEXITY
complexity increase due to + and -
Definition at line 61 of file transext.cc.
◆ BOUND_COMPLEXITY
#define BOUND_COMPLEXITY 10 |
maximum complexity of a number
Definition at line 64 of file transext.cc.
◆ COM
#define COM |
( |
|
f | ) |
(f)->complexity |
◆ DIFF_COMPLEXITY
#define DIFF_COMPLEXITY 2 |
complexity increase due to * and /
Definition at line 63 of file transext.cc.
◆ MULT_COMPLEXITY
#define MULT_COMPLEXITY 2 |
complexity increase due to * and /
Definition at line 62 of file transext.cc.
◆ ntCoeffs
#define ntCoeffs cf->extRing->cf |
◆ ntRing
#define ntRing cf->extRing |
◆ ntTest
◆ NUMIS1
TRUE iff num. represents 1.
Definition at line 67 of file transext.cc.
◆ TRANSEXT_PRIVATES
#define TRANSEXT_PRIVATES |
◆ definiteGcdCancellation()
static void definiteGcdCancellation |
( |
number |
a, |
|
|
const coeffs |
cf, |
|
|
BOOLEAN |
simpleTestsHaveAlreadyBeenPerformed |
|
) |
| |
|
static |
modifies a
Definition at line 1381 of file transext.cc.
1387 fraction
f = (fraction)a;
1390 if (
COM(
f)==0)
return;
1392 if (!simpleTestsHaveAlreadyBeenPerformed)
1516 if( DEN(
f) !=
NULL )
◆ handleNestedFractionsOverQ()
static void handleNestedFractionsOverQ |
( |
fraction |
f, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 400 of file transext.cc.
409 number c; number tmp;
418 lcmOfDenominators = tmp;
427 lcmOfDenominators = tmp;
448 gcdOfCoefficients = tmp;
457 gcdOfCoefficients = tmp;
462 number inverseOfGcdOfCoefficients =
n_Invers(gcdOfCoefficients,
476 if ((DEN(
f) !=
NULL) &&
◆ heuristicGcdCancellation()
static void heuristicGcdCancellation |
( |
number |
a, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
forward declarations
Definition at line 1296 of file transext.cc.
1301 fraction
f = (fraction)a;
1321 if( DEN(
f) !=
NULL )
1365 }
while(i<ntRing->
N);
◆ nCoeff_bottom()
◆ ntAdd()
static number ntAdd |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 941 of file transext.cc.
951 fraction
fa = (fraction)a;
952 fraction
fb = (fraction)
b;
◆ ntChineseRemainder()
Definition at line 2451 of file transext.cc.
2456 poly *P=(poly*)
omAlloc(rl*
sizeof(poly*));
2457 number *X=(number *)
omAlloc(rl*
sizeof(number));
2461 for(
i=0;
i<rl;
i++) P[
i]=
p_Copy(NUM((fraction)(
x[
i])),
cf->extRing);
◆ ntClearContent()
Definition at line 2218 of file transext.cc.
2226 const ring
R =
cf->extRing;
2233 numberCollectionEnumerator.
Reset();
2235 if( !numberCollectionEnumerator.
MoveNext() )
2248 number &n = numberCollectionEnumerator.
Current();
2252 fraction
f = (fraction)n;
2256 const poly
den = DEN(
f);
2260 const poly
num = NUM(
f);
2270 while( numberCollectionEnumerator.
MoveNext() ) ;
2279 numberCollectionEnumerator.
Reset();
2280 while (numberCollectionEnumerator.
MoveNext() )
2282 number &n = numberCollectionEnumerator.
Current();
2283 const number t =
ntDiv(n, c,
cf);
◆ ntClearDenominators()
Definition at line 2307 of file transext.cc.
2314 numberCollectionEnumerator.
Reset();
2316 if( !numberCollectionEnumerator.
MoveNext() )
2327 const ring
R =
cf->extRing;
2336 number &n = numberCollectionEnumerator.
Current();
2344 const poly
den = NUM(
f);
2371 while( numberCollectionEnumerator.
MoveNext() );
2381 numberCollectionEnumerator.
Reset();
2385 while (numberCollectionEnumerator.
MoveNext() )
2387 number &n = numberCollectionEnumerator.
Current();
2394 fraction
f = (fraction)t;
2397 const poly
den = DEN(
f);
2416 numberCollectionEnumerator.
Reset();
2417 while (numberCollectionEnumerator.
MoveNext() )
2419 number &n = numberCollectionEnumerator.
Current();
2420 fraction
f = (fraction)n;
2424 const poly
den = DEN(
f);
2444 NUM((fraction)c) =
__p_Mult_nn(NUM((fraction)c), d,
R);
◆ ntCoeffIsEqual()
◆ ntCoeffWrite()
Definition at line 843 of file transext.cc.
848 const ring
A =
cf->extRing;
857 const int P =
rVar(
A);
862 for (
int nop=0; nop < P; nop ++)
865 if (nop!=P-1)
PrintS(
", ");
◆ ntConvFactoryNSingN()
◆ ntConvSingNFactoryN()
◆ ntCopy()
Definition at line 359 of file transext.cc.
364 if (IS0(a))
return NULL;
365 fraction
f = (fraction)a;
◆ ntCopyAlg()
◆ ntCopyMap()
Definition at line 1872 of file transext.cc.
1876 if (IS0(a))
return NULL;
1878 const ring rSrc =
cf->extRing;
1879 const ring rDst = dst->extRing;
1884 fraction
f = (fraction)a;
◆ ntDBTest()
< t != 0 ==> numerator(t) != 0
Definition at line 140 of file transext.cc.
145 if (IS0(a))
return TRUE;
147 const fraction t = (fraction)a;
150 const poly
num = NUM(t);
159 Print(
"ERROR in %s:%d: non-integer Q coeff in num. poly\n",
f,
l);
164 const poly
den = DEN(t);
174 Print(
"ERROR in %s:%d: non-integer Q coeff in den. poly\n",
f,
l);
183 Print(
"ERROR in %s:%d: constant den. poly / Zp\n",
f,
l);
191 Print(
"ERROR in %s:%d: non-monic den. poly / Zp\n",
f,
l);
205 Print(
"ERROR in %s:%d: 1 != GCD between num. & den. poly\n",
f,
l);
223 Print(
"negative sign of DEN. of a fraction in %s:%d\n",
f,
l);
256 Print(
"rational coeff in num: %s:%d\n",
f,
l);
267 Print(
"rational coeff in den.:%s:%d\n",
f,
l);
◆ ntDelete()
Definition at line 300 of file transext.cc.
306 fraction
f = (fraction)(*a);
◆ ntDiff()
Definition at line 884 of file transext.cc.
897 fraction t = (fraction) d;
900 WerrorS(
"expected differentiation by a variable");
906 WerrorS(
"expected differentiation by a variable");
912 fraction
fa = (fraction)a;
◆ ntDiv()
static number ntDiv |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 1116 of file transext.cc.
1123 if (IS0(a))
return NULL;
1126 fraction
fa = (fraction)a;
1127 fraction
fb = (fraction)
b;
◆ ntEqual()
simple tests
cheap test if gcd's have been cancelled in both numbers
Definition at line 313 of file transext.cc.
322 if (a ==
b)
return TRUE;
323 if ((IS0(a)) && (!IS0(
b)))
return FALSE;
324 if ((IS0(
b)) && (!IS0(a)))
return FALSE;
327 fraction
fa = (fraction)a;
328 fraction
fb = (fraction)
b;
335 if (DENIS1(
fa) && DENIS1(
fb))
return TRUE;
336 if (DENIS1(
fa) && !DENIS1(
fb))
return FALSE;
337 if (!DENIS1(
fa) && DENIS1(
fb))
return FALSE;
◆ ntFarey()
static number ntFarey |
( |
number |
p, |
|
|
number |
n, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
◆ ntGcd()
static number ntGcd |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 1717 of file transext.cc.
1724 fraction
fa = (fraction)a;
1725 fraction
fb = (fraction)
b;
1740 number contentpa, contentpb, tmp;
◆ ntGenAlg()
◆ ntGenMap()
Definition at line 1901 of file transext.cc.
1905 if (IS0(a))
return NULL;
1907 const ring rSrc =
cf->extRing;
1908 const ring rDst = dst->extRing;
1911 fraction
f = (fraction)a;
1912 poly
g =
prMapR(NUM(
f), nMap, rSrc, rDst);
1943 h =
prMapR(DEN(
f), nMap, rSrc, rDst);
◆ ntGetDenom()
static number ntGetDenom |
( |
number & |
a, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
TODO: normalization of a!?
Definition at line 554 of file transext.cc.
572 fraction
f = (fraction)a;
594 if( DEN (
f) !=
NULL )
◆ ntGetNumerator()
static number ntGetNumerator |
( |
number & |
a, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
TODO: normalization of a!?
Definition at line 493 of file transext.cc.
498 if (IS0(a))
return NULL;
502 fraction
f = (fraction)a;
◆ ntGreater()
Definition at line 793 of file transext.cc.
803 fraction
fb = (fraction)
b;
808 fraction
fa = (fraction)a;
812 fraction
fa = (fraction)a;
815 number aDenCoeff =
NULL;
int aDenDeg = 0;
821 fraction
fb = (fraction)
b;
824 number bDenCoeff =
NULL;
int bDenDeg = 0;
830 if (aNumDeg-aDenDeg > bNumDeg-bDenDeg)
return TRUE;
831 if (aNumDeg-aDenDeg < bNumDeg-bDenDeg)
return FALSE;
◆ ntGreaterZero()
Definition at line 783 of file transext.cc.
788 if (IS0(a))
return FALSE;
789 fraction
f = (fraction)a;
◆ ntInit() [1/2]
◆ ntInit() [2/2]
◆ ntInitChar()
Initialize the coeffs object.
Definition at line 2491 of file transext.cc.
2520 cf->factoryVarOffset =
R->cf->factoryVarOffset +
rVar(
R);
2573 cf->iNumberOfParameters =
rVar(
R);
2574 cf->pParameterNames = (
const char**)
R->names;
2576 cf->has_simple_Inverse=
FALSE;
◆ ntInt()
Definition at line 760 of file transext.cc.
765 if (IS0(a))
return 0;
767 fraction
f = (fraction)a;
768 if (!DENIS1(
f))
return 0;
770 const poly aAsPoly = NUM(
f);
◆ ntInvers()
Definition at line 1162 of file transext.cc.
1172 fraction
f = (fraction)a;
1178 const poly
den = DEN(
f);
◆ ntIsMOne()
◆ ntIsOne()
◆ ntIsParam()
if m == var(i)/1 => return i,
Definition at line 2192 of file transext.cc.
2198 const ring
R =
cf->extRing;
2201 fraction
f = (fraction)
m;
2203 if( DEN(
f) !=
NULL )
◆ ntIsZero()
◆ ntKillChar()
static void ntKillChar |
( |
coeffs |
cf | ) |
|
|
static |
◆ ntMap00()
Definition at line 1818 of file transext.cc.
1824 assume(src->rep == dst->extRing->cf->rep);
1834 fraction ff=(fraction)
res;
1836 else DEN(ff)=
p_NSet(nn,dst->extRing);
◆ ntMap0P()
◆ ntMapP0()
◆ ntMapPP()
◆ ntMapUP()
◆ ntMapZ0()
◆ ntMult()
static number ntMult |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 1021 of file transext.cc.
1029 if (IS0(a) || IS0(
b))
return NULL;
1031 fraction
fa = (fraction)a;
1032 fraction
fb = (fraction)
b;
1042 const poly da = DEN(
fa);
1043 const poly db = DEN(
fb);
◆ ntNeg()
this is in-place, modifies a
Definition at line 678 of file transext.cc.
685 fraction
f = (fraction)a;
◆ ntNormalize()
static void ntNormalize |
( |
number & |
a, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
◆ ntNormalizeDen()
static void ntNormalizeDen |
( |
fraction |
result, |
|
|
const ring |
R |
|
) |
| |
|
static |
◆ ntNormalizeHelper()
static number ntNormalizeHelper |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 1634 of file transext.cc.
1639 fraction
fb = (fraction)
b;
1641 fraction
fa = (fraction)a;
1655 number contentpa, contentpb, tmp;
◆ ntParameter()
return the specified parameter as a number in the given trans.ext.
Definition at line 2170 of file transext.cc.
2175 const ring
R =
cf->extRing;
2177 assume( 0 < iParameter && iParameter <=
rVar(
R) );
◆ ntParDeg()
Definition at line 2161 of file transext.cc.
2165 if (IS0(a))
return -1;
2166 fraction
fa = (fraction)a;
2167 return cf->extRing->pFDeg(NUM(
fa),
cf->extRing);
◆ ntPower()
static void ntPower |
( |
number |
a, |
|
|
int |
exp, |
|
|
number * |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 1228 of file transext.cc.
1243 int expAbs =
exp;
if (expAbs < 0) expAbs = -expAbs;
1246 number
pow; number t;
1250 for (
int i = 2;
i <= expAbs;
i++)
1271 expAbs = expAbs / 2;
◆ ntRead()
◆ ntSetMap()
Get a mapping function from src into the domain of this type (n_transExt)
Q or Z --> Q(T)
Z --> K(T)
Z/p --> Q(T)
Q --> Z/p(T)
Z/p --> Z/p(T)
Z/u --> Z/p(T)
K(T') --> K(T)
K(T') --> K'(T)
K(T') --> K(T)
K(T') --> K'(T)
default
Definition at line 2058 of file transext.cc.
2084 if (src->ch == dst->ch)
return ntMapPP;
2088 if (
h != 1)
return NULL;
2096 if (
rVar(src->extRing) >
rVar(dst->extRing))
2099 for (
int i = 0;
i <
rVar(src->extRing);
i++)
2105 if (src->extRing->cf==dst->extRing->cf)
2112 if (src->extRing->cf==dst->extRing->cf)
◆ ntSize()
Definition at line 1791 of file transext.cc.
1795 if (IS0(a))
return 0;
1796 fraction
f = (fraction)a;
1798 unsigned long noOfTerms = 0;
1799 unsigned long numDegree = 0;
1805 unsigned long denDegree = 0;
1813 unsigned long t= ((numDegree + denDegree)*(numDegree + denDegree) + 1) * noOfTerms;
1814 if (t>INT_MAX)
return INT_MAX;
◆ ntSub()
static number ntSub |
( |
number |
a, |
|
|
number |
b, |
|
|
const coeffs |
cf |
|
) |
| |
|
static |
Definition at line 982 of file transext.cc.
992 fraction
fa = (fraction)a;
993 fraction
fb = (fraction)
b;
◆ ntWriteLong()
◆ ntWriteShort()
◆ fractionObjectBin
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static poly p_LmFreeAndNext(poly p, ring)
static number ntGenAlg(number a, const coeffs cf, const coeffs dst)
static number ntAdd(number a, number b, const coeffs cf)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp(const coeffs r)
struct for passing initialization parameters to naInitChar
void StringAppendS(const char *st)
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
static number ntNormalizeHelper(number a, number b, const coeffs cf)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static BOOLEAN ntGreater(number a, number b, const coeffs cf)
void p_Normalize(poly p, const ring r)
static number ntMult(number a, number b, const coeffs cf)
virtual reference Current()=0
Gets the current element in the collection (read and write).
static BOOLEAN rCanShortOut(const ring r)
static void p_ExpVectorDiff(poly pr, poly p1, poly p2, const ring r)
char * naCoeffName(const coeffs r)
static number ntInvers(number a, const coeffs cf)
poly singclap_gcd(poly f, poly g, const ring r)
destroys f and g
static number ntNeg(number a, const coeffs cf)
this is in-place, modifies a
static number ntMapUP(number a, const coeffs src, const coeffs dst)
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)
int p_Var(poly m, const ring r)
static coeffs nCoeff_bottom(const coeffs r, int &height)
static poly p_Neg(poly p, const ring r)
static int ntParDeg(number a, const coeffs cf)
poly p_ChineseRemainder(poly *xx, number *x, number *q, int rl, CFArray &inv_cache, const ring R)
poly singclap_pdivide(poly f, poly g, const ring r)
static FORCE_INLINE BOOLEAN nlIsInteger(number q, const coeffs r)
static BOOLEAN p_IsOne(const poly p, const ring R)
either poly(1) or gen(k)?!
static FORCE_INLINE BOOLEAN nCoeff_is_Q_or_BI(const coeffs r)
static void ntCoeffWrite(const coeffs cf, BOOLEAN details)
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
poly prMapR(poly src, nMapFunc nMap, ring src_r, ring dest_r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static number ntDiv(number a, number b, const coeffs cf)
void p_wrp(poly p, ring lmRing, ring tailRing)
static CanonicalForm ntConvSingNFactoryN(number n, BOOLEAN, const coeffs cf)
const CanonicalForm CFMap CFMap & N
static void ntNormalize(number &a, const coeffs cf)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static number ntChineseRemainder(number *x, number *q, int rl, BOOLEAN, CFArray &inv_cache, const coeffs cf)
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 void ntClearContent(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
#define ADD_COMPLEXITY
complexity increase due to + and -
static number ntCopyAlg(number a, const coeffs cf, const coeffs dst)
#define __p_Mult_nn(p, n, r)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
void p_String0Short(const poly p, ring lmRing, ring tailRing)
print p in a short way, if possible
static number ntGenMap(number a, const coeffs cf, const coeffs dst)
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,...
static BOOLEAN ntIsOne(number a, const coeffs cf)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
virtual void Reset()=0
Sets the enumerator to its initial position: -1, which is before the first element in the collection.
static unsigned pLength(poly a)
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
(fraction), see transext.h
static BOOLEAN ntEqual(number a, number b, const coeffs cf)
static FORCE_INLINE void n_CoeffWrite(const coeffs r, BOOLEAN details=TRUE)
output the coeff description
static poly p_Copy(poly p, const ring r)
returns a copy of p
static short rVar(const ring r)
#define rVar(r) (r->N)
static number ntMap0P(number a, const coeffs src, const coeffs dst)
poly p_Sub(poly p1, poly p2, const ring r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static number ntMapPP(number a, const coeffs src, const coeffs dst)
static void ntClearDenominators(ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf)
static void ntNormalizeDen(fraction result, const ring R)
static BOOLEAN ntCoeffIsEqual(const coeffs cf, n_coeffType n, void *param)
const char *const nDivBy0
void PrintS(const char *s)
#define omFreeSize(addr, size)
static number ntCopyMap(number a, const coeffs cf, const coeffs dst)
static char * rRingVar(short i, const ring r)
static number ntSub(number a, number b, const coeffs cf)
poly p_Div_nn(poly p, const number n, const ring r)
void p_String0Long(const poly p, ring lmRing, ring tailRing)
print p in a long way
poly p_Farey(poly p, number N, const ring r)
static number ntGetNumerator(number &a, const coeffs cf)
TODO: normalization of a!?
static poly pp_Mult_qq(poly p, poly q, const ring r)
void p_Write(poly p, ring lmRing, ring tailRing)
BOOLEAN fa(leftv res, leftv args)
char * naCoeffString(const coeffs r)
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 number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static number ntConvFactoryNSingN(const CanonicalForm n, const coeffs cf)
const char * p_Read(const char *st, poly &rc, const ring r)
number nlModP(number q, const coeffs, const coeffs Zp)
static number ntGcd(number a, number b, const coeffs cf)
static BOOLEAN ntIsZero(number a, const coeffs cf)
static void handleNestedFractionsOverQ(fraction f, const coeffs cf)
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)
static number ntFarey(number p, number n, const coeffs cf)
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
static void ntWriteLong(number a, const coeffs cf)
CanonicalForm convSingPFactoryP(poly p, const ring r)
gmp_float exp(const gmp_float &a)
static number ntMapP0(number a, const coeffs src, const coeffs dst)
void rDelete(ring r)
unconditionally deletes fields in r
const CanonicalForm const CanonicalForm const CanonicalForm const CanonicalForm & cand
number ntInit(long i, const coeffs cf)
static void p_Delete(poly *p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static number ntGetDenom(number &a, const coeffs cf)
TODO: normalization of a!?
#define BOUND_COMPLEXITY
maximum complexity of a number
virtual bool MoveNext()=0
Advances the enumerator to the next element of the collection. returns true if the enumerator was suc...
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
BOOLEAN p_EqualPolys(poly p1, poly p2, const ring r)
static BOOLEAN ntDBTest(number a, const char *f, const int l, const coeffs r)
#define DIFF_COMPLEXITY
complexity increase due to * and /
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...
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
poly singclap_gcd_r(poly f, poly g, const ring r)
static void ntDelete(number *a, const coeffs cf)
static number p_SetCoeff(poly p, number n, ring r)
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),...
static number ntParameter(const int iParameter, const coeffs cf)
return the specified parameter as a number in the given trans.ext.
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Rational pow(const Rational &a, int e)
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,...
void WerrorS(const char *s)
static void ntPower(number a, int exp, number *b, const coeffs cf)
static number ntMap00(number a, const coeffs src, const coeffs dst)
static const char * ntRead(const char *s, number *a, const coeffs cf)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
static void definiteGcdCancellation(number a, const coeffs cf, BOOLEAN simpleTestsHaveAlreadyBeenPerformed)
modifies a
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 void p_Setm(poly p, const ring r)
static long p_Totaldegree(poly p, const ring r)
static number ntMapZ0(number a, const coeffs src, const coeffs dst)
static BOOLEAN p_IsConstant(const poly p, const ring r)
static long ntInt(number &a, const coeffs cf)
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
static void ntKillChar(coeffs cf)
static BOOLEAN ntIsMOne(number a, const coeffs cf)
void p_Norm(poly p1, const ring r)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly p_Mult_q(poly p, poly q, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
static void heuristicGcdCancellation(number a, const coeffs cf)
forward declarations
#define omFreeBin(addr, bin)
#define MULT_COMPLEXITY
complexity increase due to * and /
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 void ntWriteShort(number a, const coeffs cf)
static BOOLEAN ntGreaterZero(number a, const coeffs cf)
static number ntCopy(number a, const coeffs cf)
nMapFunc ntSetMap(const coeffs src, const coeffs dst)
Get a mapping function from src into the domain of this type (n_transExt)
static int ntSize(number a, const coeffs cf)
#define NUMIS1(f)
TRUE iff num. represents 1.
poly prCopyR(poly p, ring src_r, ring dest_r)
poly convFactoryPSingP(const CanonicalForm &f, const ring r)
poly singclap_gcd_and_divide(poly &f, poly &g, const ring r)
clears denominators of f and g, divides by gcd(f,g)
go into polynomials over an alg. extension recursively
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.
BOOLEAN fb(leftv res, leftv args)
static BOOLEAN p_LmIsConstant(const poly p, const ring r)
poly p_Diff(poly a, int k, const ring r)
(), see rinteger.h, new impl.