3 * Interface to GiNaC's overloaded operators. */
6 * GiNaC Copyright (C) 1999-2001 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__
34 // binary arithmetic operators ex with ex
35 ex operator+(const ex & lh, const ex & rh);
36 ex operator-(const ex & lh, const ex & rh);
37 ex operator*(const ex & lh, const ex & rh);
38 ex operator/(const ex & lh, const ex & rh);
40 // binary arithmetic operators numeric with numeric
41 numeric operator+(const numeric & lh, const numeric & rh);
42 numeric operator-(const numeric & lh, const numeric & rh);
43 numeric operator*(const numeric & lh, const numeric & rh);
44 numeric operator/(const numeric & lh, const numeric & rh);
46 // binary arithmetic assignment operators with ex
47 const ex & operator+=(ex & lh, const ex & rh);
48 const ex & operator-=(ex & lh, const ex & rh);
49 const ex & operator*=(ex & lh, const ex & rh);
50 const ex & operator/=(ex & lh, const ex & rh);
52 // binary arithmetic assignment operators with numeric
53 const numeric & operator+=(numeric & lh, const numeric & rh);
54 const numeric & operator-=(numeric & lh, const numeric & rh);
55 const numeric & operator*=(numeric & lh, const numeric & rh);
56 const numeric & operator/=(numeric & lh, const numeric & rh);
59 ex operator+(const ex & lh);
60 ex operator-(const ex & lh);
62 numeric operator+(const numeric & lh);
63 numeric operator-(const numeric & lh);
64 numeric& operator++(numeric & rh);
65 numeric& operator--(numeric & rh);
66 numeric operator++(numeric & lh, int);
67 numeric operator--(numeric & lh, int);
69 // binary relational operators ex with ex
70 relational operator==(const ex & lh, const ex & rh);
71 relational operator!=(const ex & lh, const ex & rh);
72 relational operator<(const ex & lh, const ex & rh);
73 relational operator<=(const ex & lh, const ex & rh);
74 relational operator>(const ex & lh, const ex & rh);
75 relational operator>=(const ex & lh, const ex & rh);
77 // input/output stream operators
78 std::ostream & operator<<(std::ostream & os, const ex & e);
79 std::istream & operator>>(std::istream & is, ex & e);
83 #endif // ndef __GINAC_OPERATORS_H__