3 * Interface to GiNaC's overloaded operators. */
6 * GiNaC Copyright (C) 1999 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_GINAC_NAMESPACE
30 #endif // ndef NO_GINAC_NAMESPACE
36 // binary arithmetic operators ex with ex
37 ex operator+(ex const & lh, ex const & rh);
38 ex operator-(ex const & lh, ex const & rh);
39 ex operator*(ex const & lh, ex const & rh);
40 ex operator/(ex const & lh, ex const & rh);
41 ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication
45 // binary arithmetic operators ex with numeric
46 ex operator+(ex const & lh, numeric const & rh);
47 ex operator-(ex const & lh, numeric const & rh);
48 ex operator*(ex const & lh, numeric const & rh);
49 ex operator/(ex const & lh, numeric const & rh);
50 ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication
52 // binary arithmetic operators numeric with ex
53 ex operator+(numeric const & lh, ex const & rh);
54 ex operator-(numeric const & lh, ex const & rh);
55 ex operator*(numeric const & lh, ex const & rh);
56 ex operator/(numeric const & lh, ex const & rh);
57 ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication
61 // binary arithmetic operators numeric with numeric
62 numeric operator+(numeric const & lh, numeric const & rh);
63 numeric operator-(numeric const & lh, numeric const & rh);
64 numeric operator*(numeric const & lh, numeric const & rh);
65 numeric operator/(numeric const & lh, numeric const & rh);
67 // binary arithmetic assignment operators with ex
68 ex const & operator+=(ex & lh, ex const & rh);
69 ex const & operator-=(ex & lh, ex const & rh);
70 ex const & operator*=(ex & lh, ex const & rh);
71 ex const & operator/=(ex & lh, ex const & rh);
72 ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication
76 // binary arithmetic assignment operators with numeric
77 ex const & operator+=(ex & lh, numeric const & rh);
78 ex const & operator-=(ex & lh, numeric const & rh);
79 ex const & operator*=(ex & lh, numeric const & rh);
80 ex const & operator/=(ex & lh, numeric const & rh);
81 ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication
85 // binary arithmetic assignment operators with numeric
86 numeric const & operator+=(numeric & lh, numeric const & rh);
87 numeric const & operator-=(numeric & lh, numeric const & rh);
88 numeric const & operator*=(numeric & lh, numeric const & rh);
89 numeric const & operator/=(numeric & lh, numeric const & rh);
92 ex operator+(ex const & lh);
93 ex operator-(ex const & lh);
95 numeric operator+(numeric const & lh);
96 numeric operator-(numeric const & lh);
97 numeric& operator++(numeric & rh);
98 numeric& operator--(numeric & rh);
99 numeric operator++(numeric & lh, int);
100 numeric operator--(numeric & lh, int);
102 // binary relational operators ex with ex
103 relational operator==(ex const & lh, ex const & rh);
104 relational operator!=(ex const & lh, ex const & rh);
105 relational operator<(ex const & lh, ex const & rh);
106 relational operator<=(ex const & lh, ex const & rh);
107 relational operator>(ex const & lh, ex const & rh);
108 relational operator>=(ex const & lh, ex const & rh);
112 // binary relational operators ex with numeric
113 relational operator==(ex const & lh, numeric const & rh);
114 relational operator!=(ex const & lh, numeric const & rh);
115 relational operator<(ex const & lh, numeric const & rh);
116 relational operator<=(ex const & lh, numeric const & rh);
117 relational operator>(ex const & lh, numeric const & rh);
118 relational operator>=(ex const & lh, numeric const & rh);
120 // binary relational operators numeric with ex
121 relational operator==(numeric const & lh, ex const & rh);
122 relational operator!=(numeric const & lh, ex const & rh);
123 relational operator<(numeric const & lh, ex const & rh);
124 relational operator<=(numeric const & lh, ex const & rh);
125 relational operator>(numeric const & lh, ex const & rh);
126 relational operator>=(numeric const & lh, ex const & rh);
130 // input/output stream operators
131 ostream & operator<<(ostream & os, ex const & e);
132 istream & operator>>(istream & is, ex & e);
134 #ifndef NO_GINAC_NAMESPACE
136 #endif // ndef NO_GINAC_NAMESPACE
138 #endif // ndef __GINAC_OPERATORS_H__