X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Foperators.h;h=22d89370abdaabf97fc569e7587c5a07a2a145ad;hp=18b1b927ac97810d1cc50c08282d7dc1c35b359a;hb=9961dfdd7a383f09b1040e195a8817a85d945e58;hpb=383d5eb3b0f0506810d9105a268f939125bfc347 diff --git a/ginac/operators.h b/ginac/operators.h index 18b1b927..22d89370 100644 --- a/ginac/operators.h +++ b/ginac/operators.h @@ -25,65 +25,66 @@ #include -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC class ex; class numeric; class relational; // binary arithmetic operators ex with ex -ex operator+(const ex & lh, const ex & rh); -ex operator-(const ex & lh, const ex & rh); -ex operator*(const ex & lh, const ex & rh); -ex operator/(const ex & lh, const ex & rh); -ex operator%(const ex & lh, const ex & rh); // non-commutative multiplication +const ex operator+(const ex & lh, const ex & rh); +const ex operator-(const ex & lh, const ex & rh); +const ex operator*(const ex & lh, const ex & rh); +const ex operator/(const ex & lh, const ex & rh); // binary arithmetic operators numeric with numeric -numeric operator+(const numeric & lh, const numeric & rh); -numeric operator-(const numeric & lh, const numeric & rh); -numeric operator*(const numeric & lh, const numeric & rh); -numeric operator/(const numeric & lh, const numeric & rh); +const numeric operator+(const numeric & lh, const numeric & rh); +const numeric operator-(const numeric & lh, const numeric & rh); +const numeric operator*(const numeric & lh, const numeric & rh); +const numeric operator/(const numeric & lh, const numeric & rh); // binary arithmetic assignment operators with ex -const ex & operator+=(ex & lh, const ex & rh); -const ex & operator-=(ex & lh, const ex & rh); -const ex & operator*=(ex & lh, const ex & rh); -const ex & operator/=(ex & lh, const ex & rh); -const ex & operator%=(ex & lh, const ex & rh); // non-commutative multiplication +ex & operator+=(ex & lh, const ex & rh); +ex & operator-=(ex & lh, const ex & rh); +ex & operator*=(ex & lh, const ex & rh); +ex & operator/=(ex & lh, const ex & rh); // binary arithmetic assignment operators with numeric -const numeric & operator+=(numeric & lh, const numeric & rh); -const numeric & operator-=(numeric & lh, const numeric & rh); -const numeric & operator*=(numeric & lh, const numeric & rh); -const numeric & operator/=(numeric & lh, const numeric & rh); +numeric & operator+=(numeric & lh, const numeric & rh); +numeric & operator-=(numeric & lh, const numeric & rh); +numeric & operator*=(numeric & lh, const numeric & rh); +numeric & operator/=(numeric & lh, const numeric & rh); // unary operators -ex operator+(const ex & lh); -ex operator-(const ex & lh); +const ex operator+(const ex & lh); +const ex operator-(const ex & lh); + +const numeric operator+(const numeric & lh); +const numeric operator-(const numeric & lh); + +// increment / decrement operators +ex & operator++(ex & rh); +ex & operator--(ex & rh); +const ex operator++(ex & lh, int); +const ex operator--(ex & lh, int); -numeric operator+(const numeric & lh); -numeric operator-(const numeric & lh); numeric& operator++(numeric & rh); numeric& operator--(numeric & rh); -numeric operator++(numeric & lh, int); -numeric operator--(numeric & lh, int); +const numeric operator++(numeric & lh, int); +const numeric operator--(numeric & lh, int); // binary relational operators ex with ex -relational operator==(const ex & lh, const ex & rh); -relational operator!=(const ex & lh, const ex & rh); -relational operator<(const ex & lh, const ex & rh); -relational operator<=(const ex & lh, const ex & rh); -relational operator>(const ex & lh, const ex & rh); -relational operator>=(const ex & lh, const ex & rh); +const relational operator==(const ex & lh, const ex & rh); +const relational operator!=(const ex & lh, const ex & rh); +const relational operator<(const ex & lh, const ex & rh); +const relational operator<=(const ex & lh, const ex & rh); +const relational operator>(const ex & lh, const ex & rh); +const relational operator>=(const ex & lh, const ex & rh); // input/output stream operators std::ostream & operator<<(std::ostream & os, const ex & e); std::istream & operator>>(std::istream & is, ex & e); -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_OPERATORS_H__