67 for ( i = L, j = 1; i.
hasItem(); i++, j++ )
95 if ( p1.
var() > p2.
var() )
return -1;
96 else if ( p1.
var() == p2.
var() )
return 0;
218 while ( i <=
level( f ) ) {
219 while( degs[i] == 0 ) i++;
254 for ( i = a.
min() + 1; i <= a.
max(); i++ )
255 if (
level( a[i] ) > maxlevel )
256 maxlevel =
level( a[i] );
260 int * degs =
new int[maxlevel+1];
261 int * tmp =
new int[maxlevel+1];
262 for ( i = 1; i <= maxlevel; i++ )
266 for ( i = a.
min(); i <= a.
max(); i++ ) {
268 for ( j = 1; j <=
level( a[i] ); j++ )
275 while ( i <= maxlevel ) {
276 if ( degs[i] != 0 ) {
293 void optvalues (
const int * df,
const int * dg,
const int n,
int & p1,
int &pe )
301 }
while ( ( df[i] == 0 ) || ( dg[i] == 0 ) );
305 o1 = df[
i]; oe = dg[
i];
309 o1 = dg[
i]; oe = df[
i];
314 if ( ( df[i] != 0 ) && ( dg[i] != 0 ) )
318 if ( o1 >= df[i]) { o1 = df[
i]; p1 =
i; }
319 if ( oe < dg[i]) { oe = dg[
i]; pe =
i; }
323 if ( o1 >= dg[i]) { o1 = dg[
i]; p1 =
i; }
324 if ( oe < df[i]) { oe = df[
i]; pe =
i; }
350 int *
degsf =
new int[n+1];
351 int *
degsg =
new int[n+1];
353 for ( i = 0; i <= n; i++ )
355 degsf[
i] = degsg[
i] = 0;
371 if ( degsf[i] > 0 && degsg[i] > 0 )
373 if ( ( i != k ) && ( i != pe ) && ( i != p1 ) )
391 if ( degsf[i] > 0 && degsg[i] == 0 ) {
398 else if ( degsf[i] == 0 && degsg[i] > 0 )
static int cmpfunc(const MapPair &p1, const MapPair &p2)
static int cmpfunc ( const MapPair & p1, const MapPair & p2 )
static CanonicalForm subsrec(const CanonicalForm &f, const MPListIterator &i)
static CanonicalForm subsrec ( const CanonicalForm & f, const MPListIterator & i ) ...
const CanonicalForm int s
some useful template functions.
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
friend OSTREAM & operator<<(OSTREAM &s, const MapPair &p)
OSTREAM & operator << ( OSTREAM & s, const MapPair & p )
MapPair & operator=(const MapPair &p)
MapPair & MapPair::operator = ( const MapPair & p )
factory's class for variables
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
void print(OSTREAM &) const
CanonicalForm compress(const CanonicalForm &f, CFMap &m)
CanonicalForm compress ( const CanonicalForm & f, CFMap & m )
const CanonicalForm CFMap CFMap & N
Iterators for CanonicalForm's.
static void optvalues(const int *df, const int *dg, const int n, int &p1, int &pe)
void print(OSTREAM &) const
class to iterate through CanonicalForm's
static void insfunc(MapPair &orgp, const MapPair &newp)
static void insfunc ( MapPair & orgp, const MapPair & newp )
const Variable & v
< [in] a sqrfree bivariate poly
void newpair(const Variable &v, const CanonicalForm &s)
void CFMap::newpair ( const Variable & v, const CanonicalForm & s )
CanonicalForm subst() const
CF_NO_INLINE int hasTerms() const
check if iterator has reached the end of CanonicalForm
CF_NO_INLINE int exp() const
get the current exponent
CFMap & operator=(const CFMap &m)
CFMap & CFMap::operator = ( const CFMap & m )
CanonicalForm operator()(const CanonicalForm &f) const
CanonicalForm CFMap::operator () ( const CanonicalForm & f ) const.