X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Foperators.h;h=f163ec55ae4f56faa42998cc46507982bec75e4f;hp=fab2870b4fff53152dd838342f5bdd174962879c;hb=0a1b35cf1e59c9e3aae33de8febaa1c8f4bbe630;hpb=48b41ea321ed9fa6115a1061d1a1d2f8d8ad0400 diff --git a/ginac/operators.h b/ginac/operators.h index fab2870b..f163ec55 100644 --- a/ginac/operators.h +++ b/ginac/operators.h @@ -3,7 +3,7 @@ * Interface to GiNaC's overloaded operators. */ /* - * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +25,9 @@ #include +#ifndef NO_GINAC_NAMESPACE namespace GiNaC { +#endif // ndef NO_GINAC_NAMESPACE class ex; class numeric; @@ -38,29 +40,11 @@ ex operator*(ex const & lh, ex const & rh); ex operator/(ex const & lh, ex const & rh); ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication -/* - -// binary arithmetic operators ex with numeric -ex operator+(ex const & lh, numeric const & rh); -ex operator-(ex const & lh, numeric const & rh); -ex operator*(ex const & lh, numeric const & rh); -ex operator/(ex const & lh, numeric const & rh); -ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication - -// binary arithmetic operators numeric with ex -ex operator+(numeric const & lh, ex const & rh); -ex operator-(numeric const & lh, ex const & rh); -ex operator*(numeric const & lh, ex const & rh); -ex operator/(numeric const & lh, ex const & rh); -ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication - -*/ - // binary arithmetic operators numeric with numeric -numeric operator+(numeric const & lh, numeric const & rh); -numeric operator-(numeric const & lh, numeric const & rh); -numeric operator*(numeric const & lh, numeric const & rh); -numeric operator/(numeric const & lh, numeric const & 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); +numeric operator/(const numeric & lh, const numeric & rh); // binary arithmetic assignment operators with ex ex const & operator+=(ex & lh, ex const & rh); @@ -69,29 +53,18 @@ ex const & operator*=(ex & lh, ex const & rh); ex const & operator/=(ex & lh, ex const & rh); ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication -/* - -// binary arithmetic assignment operators with numeric -ex const & operator+=(ex & lh, numeric const & rh); -ex const & operator-=(ex & lh, numeric const & rh); -ex const & operator*=(ex & lh, numeric const & rh); -ex const & operator/=(ex & lh, numeric const & rh); -ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication - -*/ - // binary arithmetic assignment operators with numeric -numeric const & operator+=(numeric & lh, numeric const & rh); -numeric const & operator-=(numeric & lh, numeric const & rh); -numeric const & operator*=(numeric & lh, numeric const & rh); -numeric const & operator/=(numeric & lh, numeric const & 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); +const numeric & operator/=(numeric & lh, const numeric & rh); // unary operators ex operator+(ex const & lh); ex operator-(ex const & lh); -numeric operator+(numeric const & lh); -numeric operator-(numeric const & lh); +numeric operator+(const numeric & lh); +numeric operator-(const numeric & lh); numeric& operator++(numeric & rh); numeric& operator--(numeric & rh); numeric operator++(numeric & lh, int); @@ -105,30 +78,12 @@ relational operator<=(ex const & lh, ex const & rh); relational operator>(ex const & lh, ex const & rh); relational operator>=(ex const & lh, ex const & rh); -/* - -// binary relational operators ex with numeric -relational operator==(ex const & lh, numeric const & rh); -relational operator!=(ex const & lh, numeric const & rh); -relational operator<(ex const & lh, numeric const & rh); -relational operator<=(ex const & lh, numeric const & rh); -relational operator>(ex const & lh, numeric const & rh); -relational operator>=(ex const & lh, numeric const & rh); - -// binary relational operators numeric with ex -relational operator==(numeric const & lh, ex const & rh); -relational operator!=(numeric const & lh, ex const & rh); -relational operator<(numeric const & lh, ex const & rh); -relational operator<=(numeric const & lh, ex const & rh); -relational operator>(numeric const & lh, ex const & rh); -relational operator>=(numeric const & lh, ex const & rh); - -*/ - // input/output stream operators ostream & operator<<(ostream & os, ex const & e); istream & operator>>(istream & is, ex & e); +#ifndef NO_GINAC_NAMESPACE } // namespace GiNaC +#endif // ndef NO_GINAC_NAMESPACE #endif // ndef __GINAC_OPERATORS_H__