X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fmul.h;h=8009d78410424e7d304303fa2de2a6f485f14751;hb=86639cca6eecbdf16ed3a5428351f3bb63804cac;hp=cad3b9b3e5302b90666302897d5d2a3eb4eda83e;hpb=1bd972bf8e4eeeb8aec6081100876e81a7f18450;p=ginac.git diff --git a/ginac/mul.h b/ginac/mul.h index cad3b9b3..8009d784 100644 --- a/ginac/mul.h +++ b/ginac/mul.h @@ -25,20 +25,18 @@ #include "expairseq.h" -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC /** Product of expressions. */ class mul : public expairseq { GINAC_DECLARE_REGISTERED_CLASS(mul, expairseq) - + friend class add; friend class ncmul; friend class power; - - // other constructors + + // other ctors public: mul(const ex & lh, const ex & rh); mul(const exvector & v); @@ -46,16 +44,14 @@ public: mul(const epvector & v, const ex & oc); mul(epvector * vp, const ex & oc); mul(const ex & lh, const ex & mh, const ex & rh); - + // functions overriding virtual functions from bases classes public: - void print(std::ostream & os, unsigned upper_precedence) const; - void printraw(std::ostream & os) const; - void printcsrc(std::ostream & os, unsigned type, unsigned upper_precedence) const; + void print(const print_context & c, unsigned level = 0) const; bool info(unsigned inf) const; - int degree(const symbol & s) const; - int ldegree(const symbol & s) const; - ex coeff(const symbol & s, int n = 1) const; + int degree(const ex & s) const; + int ldegree(const ex & s) const; + ex coeff(const ex & s, int n = 1) const; ex eval(int level=0) const; ex evalf(int level=0) const; ex series(const relational & s, int order, unsigned options = 0) const; @@ -63,7 +59,7 @@ public: numeric integer_content(void) const; ex smod(const numeric &xi) const; numeric max_coefficient(void) const; - exvector get_indices(void) const; + exvector get_free_indices(void) const; ex simplify_ncmul(const exvector & v) const; protected: ex derivative(const symbol & s) const; @@ -87,13 +83,13 @@ protected: // new virtual functions which can be overridden by derived classes // none - + // non-virtual functions in this class protected: epvector * expandchildren(unsigned options) const; - + // member variables - + protected: static unsigned precedence; }; @@ -104,8 +100,6 @@ inline const mul &ex_to_mul(const ex &e) return static_cast(*e.bp); } -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_MUL_H__