23#define __ARRAY_INIT__ -1
110 for (
i=
PS;
i.hasItem();
i++)
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;
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;
201 y=
i.getItem().mvar();
257#define __INIT_GAP__ 3
283 for (
i=
gap;
i <= n - 1;
i++)
297 for (
i= 0;
i <= n - 1;
i++)
333 if (
G.inCoeffDomain())
337 else if (
G.inCoeffDomain())
413 m.getItem()=
j.getItem();
416 j.getItem()=
m.getItem();
440 if ((
size (
j.getItem()) <
size (
m.getItem())) ||
442 && (
j.getItem().level() <
m.getItem().level())))
445 m.getItem()=
j.getItem();
448 j.getItem()=
m.getItem();
486 for (
i= a;
i.hasItem();
i++)
503 for (
i= is;
i.hasItem();
i++)
505 if (
i.getItem().level() > 0)
520 for (
j=
qhi;
j.hasItem();
j++)
542 for (
i= is ;
i.hasItem();
i++)
544 if (
i.getItem().level() > 0)
557 for (
j=
qhi;
j.hasItem();
j++)
684 for (
i.lastItem();
i.hasItem();
i--)
691 if (ch == 0 && !
isRat)
695 if (ch == 0 && !
isRat)
700 if (ch == 0 && !
isRat)
715 for (
i.lastItem();
i.hasItem();
i--)
726 for (
i= L;
i.hasItem();
i++)
728 if (
i.getItem().isUnivariate() &&
i.getItem().level() == 1)
738 for (;
i.hasItem();
i++)
766 tmp=
j.getItem().factor();
767 if (!
tmp.inCoeffDomain())
783 if (!
cF.inCoeffDomain())
794 if (
cF.inCoeffDomain())
832 for (
int i=1;
i<= n;
i++)
847 if (
j.getItem() != r)
864 if (
j.getItem() != r)
882 if ((!
i.hasItem()) || (
PS.
getFirst().level() == 0 ))
888 for (;
i.hasItem();
i++)
909 for (
i=
cs1;
i.hasItem();
i++)
917 for (
i= is;
i.hasItem();
i++)
944 for (;
j.hasItem();
j++)
void inplaceUnion(const ListCFList &a, ListCFList &b)
Union of a and b stored in b.
CFList uniGcd(const CFList &L)
void removeFactors(CanonicalForm &r, StoreFactors &StoredFactors, CFList &removedFactors)
CFList initials(const CFList &L)
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)
CFList swapvar(const CFList &PS, const Variable &x, const Variable &y)
swapvar a whole list of CanonicalForms
CanonicalForm Prem(const CanonicalForm &F, const CanonicalForm &G)
pseudo remainder of F by G with certain factors of LC (g) cancelled
int nr_of_poly(const CFList &PS, const Variable &x, Intarray &G)
CanonicalForm Premb(const CanonicalForm &f, const CFList &L)
pseudo remainder of f by L with faster test for remainder being zero
CFList only_in_one(const CFList &PS, const Variable &x)
int minLevel(const CFList &L)
CFList factorsOfInitials(const CFList &L)
int Tdeg(const CFList &PS, const Variable &x, Intarray &A, Intarray &B, Intarray &C, Intarray &D, Intarray &E, Intarray &F)
int degpsmin(const CFList &PS, const Variable &x, Intarray &A, Intarray &B, Intarray &C, Intarray &D)
void initArray(const int highest_level, Intarray &A, Intarray &B, Intarray &C, Intarray &D, Intarray &E, Intarray &F, Intarray &G)
void removeContent(CanonicalForm &F, CanonicalForm &cF)
bool contractsub(const CFList &cs1, const CFList &cs2)
void select(const ListCFList &ppi, int length, ListCFList &ppi1, ListCFList &ppi2)
bool isSubset(const CFList &PS, const CFList &Cset)
is PS a subset of Cset ?
Variable get_max_var(const CFList &PS)
void sortListCFList(ListCFList &list)
sort in descending order of length of elements
ListCFList adjoinb(const CFList &is, const CFList &qs, const ListCFList &qh, const CFList &cs)
int degpsmax(const CFList &PS, const Variable &x, Intarray &A, Intarray &C)
void sortCFListByLevel(CFList &list)
sort in descending order of level of elements
ListCFList contract(const ListCFList &cs)
CFList factorPSet(const CFList &PS)
bool lowerRank(const CanonicalForm &F, const CanonicalForm &G, int &ind)
Varlist reorderb(const Varlist &difference, const CFList &PS, const int highest_level)
ListCFList adjoin(const CFList &is, const CFList &qs, const ListCFList &qh)
CanonicalForm lowestRank(const CFList &L)
CanonicalForm normalize(const CanonicalForm &F)
normalize a poly, i.e. in char 0 clear denominators, remove integer content in char p divide by leadi...
This file provides utility functions to compute characteristic sets.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
declarations of higher level algorithms.
CFList get_Terms(const CanonicalForm &f)
CFFList FACTORY_PUBLIC factorize(const CanonicalForm &f, bool issqrfree=false)
factorization over or
static const int SW_RATIONAL
set to 1 for computations over Q
class to store factors that get removed during char set computation
factory's class for variables
const CanonicalForm int const CFList const Variable & y
REvaluation E(1, terms.length(), IntRandom(25))
const Variable & v
< [in] a sqrfree bivariate poly
static int min(int a, int b)
static int max(int a, int b)
template List< Variable > Union(const List< Variable > &, const List< Variable > &)
template List< Variable > Difference(const List< Variable > &, const List< Variable > &)
template bool find(const List< CanonicalForm > &, const CanonicalForm &)
static BOOLEAN length(leftv result, leftv arg)
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)
static CanonicalForm * retvalue
int status int void size_t count
int status int void * buf