23 #define __ARRAY_INIT__ -1 30 int varlevel=
level(x);
57 int varlevel=
level(x);
73 if (temp < min && temp != 0)
113 if (
degree (elem, x) == k)
117 if (LCdegList.
length() > 0)
120 int newmin, newnopslc;
124 nopslc= TermList.
length();
125 for (i= LCdegList; i.
hasItem(); i++)
130 newnopslc= TermList.length();
133 if (newnopslc < nopslc)
170 else if (C[ylevel] < C[xlevel])
return 1;
171 else if (C[xlevel] < C[ylevel])
return 0;
172 else if (
degpsmin(PS,x,A,B,C,D) <
degpsmin(PS,y,A,B,C,D))
return 1;
173 else if (
degpsmin(PS,y,A,B,C,D) <
degpsmin(PS,x,A,B,C,D))
return 0;
174 else if (D[ylevel] < D[xlevel])
return 1;
175 else if (D[xlevel] < D[ylevel])
return 0;
176 else if (
Tdeg(PS,y,A,B,C,D,E,F) <
Tdeg(PS,x,A,B,C,D,E,F))
return 1;
177 else if (
Tdeg(PS,x,A,B,C,D,E,F) <
Tdeg(PS,y,A,B,C,D,E,F))
return 0;
178 else if (F[ylevel] < F[xlevel])
return 1;
179 else if (F[xlevel] < F[ylevel])
return 0;
201 y=
i.getItem().mvar();
231 for (
int i=1 ;
i <= highest_level;
i ++)
257 #define __INIT_GAP__ 3 260 const int highest_level)
262 Intarray A(1, highest_level),
B(1, highest_level), C(1, highest_level),
263 D(1, highest_level),
E(1, highest_level), F(1, highest_level),
271 for (J= difference; J.
hasItem(); J++ )
283 for (i= gap; i <= n - 1; i++)
286 for (
j= i - gap;
j >=0 ;
j -= gap)
297 for (i= 0; i <= n - 1; i++)
327 int degF, degG, levelF, levelG;
339 else if (levelF < levelG)
341 else if (levelF == levelG)
347 else if (degF == degG)
408 if ((
j.getItem().length() < m.
getItem().length()) ||
409 (
j.getItem().length() == m.
getItem().length() &&
442 && (
j.getItem().level() < m.
getItem().level())))
465 if (!
find (Cset,
i.getItem()))
514 for (i= iscopy; i.
hasItem(); i++)
551 for (i= iscopy; i.
hasItem(); i++)
578 if (length <= elem.
length())
619 int degF, degG, levelF, levelG;
623 if ( (levelF= F.
level()) < (levelG= G.
level()))
627 if ( levelF == levelG )
646 g= g - l*
power (v, degG);
650 while ((degG <= degF) && (!f.
isZero()))
652 test=
gcd (l,
LC(f));
655 t= g*lv*
power (v, degF - degG);
737 for (; i.hasItem(); i++)
738 g=
gcd (g, i.getItem());
765 tmp=
j.getItem().factor();
813 if (factors.
getFirst().factor().inCoeffDomain())
815 for (j= factors; j.
hasItem(); j++ )
831 for (
int i=1;
i<= n;
i++)
939 if (!
find (mem, iitem))
946 if (!
find (mem, jitem))
int status int void size_t count
void sortCFListByLevel(CFList &list)
sort in descending order of level of elements
void removeFactors(CanonicalForm &r, StoreFactors &StoredFactors, CFList &removedFactors)
const CanonicalForm int const CFList const Variable & y
ListCFList adjoin(const CFList &is, const CFList &qs, const ListCFList &qh)
Variable get_max_var(const CFList &PS)
bool contractsub(const CFList &cs1, const CFList &cs2)
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)
CFList FS1
factors that were removed
void inplaceUnion(const ListCFList &a, ListCFList &b)
Union of a and b stored in b.
Varlist reorderb(const Varlist &difference, const CFList &PS, const int highest_level)
CanonicalForm normalize(const CanonicalForm &F)
normalize a poly, i.e. in char 0 clear denominators, remove integer content in char p divide by leadi...
CFList factorsOfInitials(const CFList &L)
static int min(int a, int b)
void sortListCFList(ListCFList &list)
sort in descending order of length of elements
factory's class for variables
class to store factors that get removed during char set computation
CFList uniGcd(const CFList &L)
int degpsmax(const CFList &PS, const Variable &x, Intarray &A, Intarray &C)
int minLevel(const CFList &L)
bool isSubset(const CFList &PS, const CFList &Cset)
is PS a subset of Cset ?
void removeContent(CanonicalForm &F, CanonicalForm &cF)
void initArray(const int highest_level, Intarray &A, Intarray &B, Intarray &C, Intarray &D, Intarray &E, Intarray &F, Intarray &G)
template bool find(const List< CanonicalForm > &, const CanonicalForm &)
template List< Variable > Union(const List< Variable > &, const List< Variable > &)
This file provides utility functions to compute characteristic sets.
CFFList factorize(const CanonicalForm &f, bool issqrfree=false)
factorization over or
CFList factorPSet(const CFList &PS)
bool lowerRank(const CanonicalForm &F, const CanonicalForm &G, int &ind)
ListCFList adjoinb(const CFList &is, const CFList &qs, const ListCFList &qh, const CFList &cs)
int nr_of_poly(const CFList &PS, const Variable &x, Intarray &G)
CFList initials(const CFList &L)
static int max(int a, int b)
CFList get_Terms(const CanonicalForm &f)
int degord(const Variable &x, const Variable &y, const CFList &PS, Intarray &A, Intarray &B, Intarray &C, Intarray &D, Intarray &E, Intarray &F, Intarray &G)
int status int void * buf
CFList FS2
candidate factors that might get removed
void select(const ListCFList &ppi, int length, ListCFList &ppi1, ListCFList &ppi2)
int degpsmin(const CFList &PS, const Variable &x, Intarray &A, Intarray &B, Intarray &C, Intarray &D)
ListCFList contract(const ListCFList &cs)
static const int SW_RATIONAL
set to 1 for computations over Q
declarations of higher level algorithms.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
CanonicalForm lowestRank(const CFList &L)
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
const Variable & v
< [in] a sqrfree bivariate poly
CFList only_in_one(const CFList &PS, const Variable &x)
int Tdeg(const CFList &PS, const Variable &x, Intarray &A, Intarray &B, Intarray &C, Intarray &D, Intarray &E, Intarray &F)
REvaluation E(1, terms.length(), IntRandom(25))
CanonicalForm Premb(const CanonicalForm &f, const CFList &L)
pseudo remainder of f by L with faster test for remainder being zero
CanonicalForm Prem(const CanonicalForm &F, const CanonicalForm &G)
pseudo remainder of F by G with certain factors of LC (g) cancelled
CFList swapvar(const CFList &PS, const Variable &x, const Variable &y)
swapvar a whole list of CanonicalForms
template List< Variable > Difference(const List< Variable > &, const List< Variable > &)