3 * Interface to GiNaC's overloaded operators.
5 * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __GINAC_OPERATORS_H__
23 #define __GINAC_OPERATORS_H__
31 // binary arithmetic operators ex with ex
32 ex operator+(ex const & lh, ex const & rh);
33 ex operator-(ex const & lh, ex const & rh);
34 ex operator*(ex const & lh, ex const & rh);
35 ex operator/(ex const & lh, ex const & rh);
36 ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication
40 // binary arithmetic operators ex with numeric
41 ex operator+(ex const & lh, numeric const & rh);
42 ex operator-(ex const & lh, numeric const & rh);
43 ex operator*(ex const & lh, numeric const & rh);
44 ex operator/(ex const & lh, numeric const & rh);
45 ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication
47 // binary arithmetic operators numeric with ex
48 ex operator+(numeric const & lh, ex const & rh);
49 ex operator-(numeric const & lh, ex const & rh);
50 ex operator*(numeric const & lh, ex const & rh);
51 ex operator/(numeric const & lh, ex const & rh);
52 ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication
56 // binary arithmetic operators numeric with numeric
57 numeric operator+(numeric const & lh, numeric const & rh);
58 numeric operator-(numeric const & lh, numeric const & rh);
59 numeric operator*(numeric const & lh, numeric const & rh);
60 numeric operator/(numeric const & lh, numeric const & rh);
62 // binary arithmetic assignment operators with ex
63 ex const & operator+=(ex & lh, ex const & rh);
64 ex const & operator-=(ex & lh, ex const & rh);
65 ex const & operator*=(ex & lh, ex const & rh);
66 ex const & operator/=(ex & lh, ex const & rh);
67 ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication
71 // binary arithmetic assignment operators with numeric
72 ex const & operator+=(ex & lh, numeric const & rh);
73 ex const & operator-=(ex & lh, numeric const & rh);
74 ex const & operator*=(ex & lh, numeric const & rh);
75 ex const & operator/=(ex & lh, numeric const & rh);
76 ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication
80 // binary arithmetic assignment operators with numeric
81 numeric const & operator+=(numeric & lh, numeric const & rh);
82 numeric const & operator-=(numeric & lh, numeric const & rh);
83 numeric const & operator*=(numeric & lh, numeric const & rh);
84 numeric const & operator/=(numeric & lh, numeric const & rh);
87 ex operator+(ex const & lh);
88 ex operator-(ex const & lh);
90 numeric operator+(numeric const & lh);
91 numeric operator-(numeric const & lh);
93 // binary relational operators ex with ex
94 relational operator==(ex const & lh, ex const & rh);
95 relational operator!=(ex const & lh, ex const & rh);
96 relational operator<(ex const & lh, ex const & rh);
97 relational operator<=(ex const & lh, ex const & rh);
98 relational operator>(ex const & lh, ex const & rh);
99 relational operator>=(ex const & lh, ex const & rh);
103 // binary relational operators ex with numeric
104 relational operator==(ex const & lh, numeric const & rh);
105 relational operator!=(ex const & lh, numeric const & rh);
106 relational operator<(ex const & lh, numeric const & rh);
107 relational operator<=(ex const & lh, numeric const & rh);
108 relational operator>(ex const & lh, numeric const & rh);
109 relational operator>=(ex const & lh, numeric const & rh);
111 // binary relational operators numeric with ex
112 relational operator==(numeric const & lh, ex const & rh);
113 relational operator!=(numeric const & lh, ex const & rh);
114 relational operator<(numeric const & lh, ex const & rh);
115 relational operator<=(numeric const & lh, ex const & rh);
116 relational operator>(numeric const & lh, ex const & rh);
117 relational operator>=(numeric const & lh, ex const & rh);
121 // input/output stream operators
122 ostream & operator<<(ostream & os, ex const & e);
123 istream & operator>>(istream & is, ex & e);
125 #endif // ndef __GINAC_OPERATORS_H__