X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fnormal.cpp;h=82fcaf848dd250ea14106dab40a9b0d87b40edf2;hp=65c810980816a921c583b5d9b5c812b0f38b3ebd;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c diff --git a/ginac/normal.cpp b/ginac/normal.cpp index 65c81098..82fcaf84 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -25,6 +25,8 @@ */ #include +#include +#include #include "normal.h" #include "basic.h" @@ -44,6 +46,8 @@ #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. @@ -82,8 +86,6 @@ static bool get_first_symbol(const ex &e, const symbol *&x) * Statistical information about symbols in polynomials */ -#include - /** 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 @@ -489,8 +491,6 @@ bool divide(const ex &a, const ex &b, ex &q, bool check_args) * Remembering */ -#include - typedef pair ex2; typedef pair exbool; @@ -908,7 +908,7 @@ ex basic::smod(const numeric &xi) const ex numeric::smod(const numeric &xi) const { - return ::smod(*this, xi); + return GiNaC::smod(*this, xi); } ex add::smod(const numeric &xi) const @@ -919,13 +919,13 @@ 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); } @@ -941,7 +941,7 @@ ex mul::smod(const numeric &xi) const #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); @@ -1484,3 +1484,5 @@ ex ex::normal(int level) const else return e; } + +} // namespace GiNaC