 |
My Project
debian-1:4.1.1-p2+ds-4build1
|
Go to the documentation of this file.
94 ASSERT(
x.
level() > 0,
"type error: polynomial variable expected" );
95 ASSERT( !
g.isZero(),
"math error: division by zero" );
105 int fDegree =
degree( F, X );
107 if ( (fDegree < 0) || (fDegree < gDegree) )
133 while ( ( dv <= dr ) && ( !r.
isZero()) )
174 ASSERT(
x.
level() > 0,
"type error: polynomial variable expected" );
175 ASSERT( !
g.isZero(),
"math error: division by zero" );
185 int fDegree =
degree( F, X );
187 if ( fDegree < 0 || fDegree < gDegree )
225 ASSERT(
x.
level() > 0,
"type error: polynomial variable expected" );
226 ASSERT( !
g.isZero(),
"math error: division by zero" );
236 int fDegree =
degree( F, X );
238 if ( fDegree < 0 || fDegree < gDegree ) {
264 if (
f.inBaseDomain() )
343 else if (
f.isZero() )
346 if ( (
f.inCoeffDomain() ||
g.inCoeffDomain())
351 if (
f.inCoeffDomain() )
360 int fLevel =
f.level();
361 int gLevel =
g.level();
362 if ( (gLevel > 0) && (fLevel == gLevel) )
373 else if ( gLevel < fLevel )
394 else if (
f.isZero() )
397 if ( (
f.inCoeffDomain() ||
g.inCoeffDomain())
402 if (
f.inCoeffDomain() )
414 int fLevel =
f.level();
415 int gLevel =
g.level();
416 if ( (gLevel > 0) && (fLevel == gLevel) )
433 else if ( gLevel < fLevel )
460 else if (
f.isZero() )
463 if (
f.inCoeffDomain() ||
g.inCoeffDomain())
466 if (
f.inCoeffDomain() )
480 int fLevel =
f.level();
481 int gLevel =
g.level();
482 if ( (gLevel > 0) && (fLevel == gLevel) )
486 bool dividestail=
tryFdivides (
f.tailcoeff(),
g.tailcoeff(),
M, fail);
488 if (fail || !dividestail)
491 if (fail || !dividesLC)
495 if (fail || !divides)
499 else if ( gLevel < fLevel )
511 if (fail || !divides)
536 if (
f.inBaseDomain() )
542 if ( coeffMaxNorm >
result )
565 ASSERT( (
f.inBaseDomain() ||
f.isUnivariate()) &&
f.LC().inZ(),
566 "type error: univariate poly over Z expected" );
static const int SW_RATIONAL
set to 1 for computations over Q
CanonicalForm psr(const CanonicalForm &rr, const CanonicalForm &vv, const Variable &x)
CanonicalForm psr ( const CanonicalForm & f, const CanonicalForm & g, const Variable & x )
class to iterate through CanonicalForm's
static CanonicalForm internalBCommonDen(const CanonicalForm &f)
static CanonicalForm internalBCommonDen ( const CanonicalForm & f )
gmp_float sqrt(const gmp_float &a)
bool tryFdivides(const CanonicalForm &f, const CanonicalForm &g, const CanonicalForm &M, bool &fail)
same as fdivides but handles zero divisors in Z_p[t]/(f)[x1,...,xn] for reducible f
CanonicalForm maxNorm(const CanonicalForm &f)
CanonicalForm maxNorm ( const CanonicalForm & f )
CanonicalForm psq(const CanonicalForm &f, const CanonicalForm &g, const Variable &x)
CanonicalForm psq ( const CanonicalForm & f, const CanonicalForm & g, const Variable & x )
#define ASSERT(expression, message)
Rational abs(const Rational &a)
void out_cf(const char *s1, const CanonicalForm &f, const char *s2)
cf_algorithm.cc - simple mathematical algorithms.
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
void psqr(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &q, CanonicalForm &r, const Variable &x)
void psqr ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & q, CanonicalForm & r,...
factory's class for variables
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
const Variable & v
< [in] a sqrfree bivariate poly
void tryInvert(const CanonicalForm &F, const CanonicalForm &M, CanonicalForm &inv, bool &fail)
CanonicalForm euclideanNorm(const CanonicalForm &f)
CanonicalForm euclideanNorm ( const CanonicalForm & f )