3 * Interface to GiNaC's overloaded operators. */
6 * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __GINAC_OPERATORS_H__
24 #define __GINAC_OPERATORS_H__
28 #ifndef NO_NAMESPACE_GINAC
30 #endif // ndef NO_NAMESPACE_GINAC
36 // binary arithmetic operators ex with ex
37 ex operator+(const ex & lh, const ex & rh);
38 ex operator-(const ex & lh, const ex & rh);
39 ex operator*(const ex & lh, const ex & rh);
40 ex operator/(const ex & lh, const ex & rh);
41 ex operator%(const ex & lh, const ex & rh); // non-commutative multiplication
43 // binary arithmetic operators numeric with numeric
44 numeric operator+(const numeric & lh, const numeric & rh);
45 numeric operator-(const numeric & lh, const numeric & rh);
46 numeric operator*(const numeric & lh, const numeric & rh);
47 numeric operator/(const numeric & lh, const numeric & rh);
49 // binary arithmetic assignment operators with ex
50 const ex & operator+=(ex & lh, const ex & rh);
51 const ex & operator-=(ex & lh, const ex & rh);
52 const ex & operator*=(ex & lh, const ex & rh);
53 const ex & operator/=(ex & lh, const ex & rh);
54 const ex & operator%=(ex & lh, const ex & rh); // non-commutative multiplication
56 // binary arithmetic assignment operators with numeric
57 const numeric & operator+=(numeric & lh, const numeric & rh);
58 const numeric & operator-=(numeric & lh, const numeric & rh);
59 const numeric & operator*=(numeric & lh, const numeric & rh);
60 const numeric & operator/=(numeric & lh, const numeric & rh);
63 ex operator+(const ex & lh);
64 ex operator-(const ex & lh);
66 numeric operator+(const numeric & lh);
67 numeric operator-(const numeric & lh);
68 numeric& operator++(numeric & rh);
69 numeric& operator--(numeric & rh);
70 numeric operator++(numeric & lh, int);
71 numeric operator--(numeric & lh, int);
73 // binary relational operators ex with ex
74 relational operator==(const ex & lh, const ex & rh);
75 relational operator!=(const ex & lh, const ex & rh);
76 relational operator<(const ex & lh, const ex & rh);
77 relational operator<=(const ex & lh, const ex & rh);
78 relational operator>(const ex & lh, const ex & rh);
79 relational operator>=(const ex & lh, const ex & rh);
81 // input/output stream operators
82 ostream & operator<<(ostream & os, const ex & e);
83 istream & operator>>(istream & is, ex & e);
85 #ifndef NO_NAMESPACE_GINAC
87 #endif // ndef NO_NAMESPACE_GINAC
89 #endif // ndef __GINAC_OPERATORS_H__