* multivariate polynomials and rational functions.
* These functions include polynomial quotient and remainder, GCD and LCM
* computation, square-free factorization and rational function normalization.
+ */
- *
+/*
* GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
*/
#include <stdexcept>
+#include <algorithm>
+#include <map>
#include "normal.h"
#include "basic.h"
#include "series.h"
#include "symbol.h"
+namespace GiNaC {
+
// If comparing expressions (ex::compare()) is fast, you can set this to 1.
// Some routines like quo(), rem() and gcd() will then return a quick answer
// when they are called with two identical arguments.
* Statistical information about symbols in polynomials
*/
-#include <algorithm>
-
/** This structure holds information about the highest and lowest degrees
* in which a symbol appears in two multivariate polynomials "a" and "b".
* A vector of these structures with information about all symbols in
* Remembering
*/
-#include <map>
-
typedef pair<ex, ex> ex2;
typedef pair<ex, bool> exbool;
ex numeric::smod(const numeric &xi) const
{
- return ::smod(*this, xi);
+ return GiNaC::smod(*this, xi);
}
ex add::smod(const numeric &xi) const
epvector::const_iterator itend = seq.end();
while (it != itend) {
ASSERT(!is_ex_exactly_of_type(it->rest,numeric));
- numeric coeff = ::smod(ex_to_numeric(it->coeff), xi);
+ numeric coeff = GiNaC::smod(ex_to_numeric(it->coeff), xi);
if (!coeff.is_zero())
newseq.push_back(expair(it->rest, coeff));
it++;
}
ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
- numeric coeff = ::smod(ex_to_numeric(overall_coeff), xi);
+ numeric coeff = GiNaC::smod(ex_to_numeric(overall_coeff), xi);
return (new add(newseq,coeff))->setflag(status_flags::dynallocated);
}
#endif // def DOASSERT
mul * mulcopyp=new mul(*this);
ASSERT(is_ex_exactly_of_type(overall_coeff,numeric));
- mulcopyp->overall_coeff=::smod(ex_to_numeric(overall_coeff),xi);
+ mulcopyp->overall_coeff = GiNaC::smod(ex_to_numeric(overall_coeff),xi);
mulcopyp->clearflag(status_flags::evaluated);
mulcopyp->clearflag(status_flags::hash_calculated);
return mulcopyp->setflag(status_flags::dynallocated);
else
return e;
}
+
+} // namespace GiNaC