]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
- removed an obscure reference that broke internal functions.
[ginac.git] / ginac / operators.h
1 /** @file operators.h
2  *
3  *  Interface to GiNaC's overloaded operators. */
4
5 /*
6  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
7  *
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.
12  *
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.
17  *
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
21  */
22
23 #ifndef __GINAC_OPERATORS_H__
24 #define __GINAC_OPERATORS_H__
25
26 #include <iostream>
27
28 namespace GiNaC {
29
30 class ex;
31 class numeric;
32 class relational;
33
34 // binary arithmetic operators ex with ex
35 ex operator+(ex const & lh, ex const & rh);
36 ex operator-(ex const & lh, ex const & rh);
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); // non-commutative multiplication
40
41 /*
42
43 // binary arithmetic operators ex with numeric
44 ex operator+(ex const & lh, numeric const & rh);
45 ex operator-(ex const & lh, numeric const & rh);
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); // non-commutative multiplication
49
50 // binary arithmetic operators numeric with ex
51 ex operator+(numeric const & lh, ex const & rh);
52 ex operator-(numeric const & lh, ex const & rh);
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); // non-commutative multiplication
56
57 */
58
59 // binary arithmetic operators numeric with numeric
60 numeric operator+(numeric const & lh, numeric const & rh);
61 numeric operator-(numeric const & lh, numeric const & rh);
62 numeric operator*(numeric const & lh, numeric const & rh);
63 numeric operator/(numeric const & lh, numeric const & rh);
64
65 // binary arithmetic assignment operators with ex
66 ex const & operator+=(ex & lh, ex const & rh);
67 ex const & operator-=(ex & lh, ex const & rh);
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); // non-commutative multiplication
71
72 /*
73   
74 // binary arithmetic assignment operators with numeric
75 ex const & operator+=(ex & lh, numeric const & rh);
76 ex const & operator-=(ex & lh, numeric const & rh);
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); // non-commutative multiplication
80
81 */
82
83 // binary arithmetic assignment operators with numeric
84 numeric const & operator+=(numeric & lh, numeric const & rh);
85 numeric const & operator-=(numeric & lh, numeric const & rh);
86 numeric const & operator*=(numeric & lh, numeric const & rh);
87 numeric const & operator/=(numeric & lh, numeric const & rh);
88
89 // unary operators
90 ex operator+(ex const & lh);
91 ex operator-(ex const & lh);
92
93 numeric operator+(numeric const & lh);
94 numeric operator-(numeric const & lh);
95
96 // binary relational operators ex with ex
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);
100 relational operator<=(ex const & lh, ex const & rh);
101 relational operator>(ex const & lh, ex const & rh);
102 relational operator>=(ex const & lh, ex const & rh);
103
104 /*
105
106 // binary relational operators ex with numeric
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);
110 relational operator<=(ex const & lh, numeric const & rh);
111 relational operator>(ex const & lh, numeric const & rh);
112 relational operator>=(ex const & lh, numeric const & rh);
113
114 // binary relational operators numeric with ex
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);
118 relational operator<=(numeric const & lh, ex const & rh);
119 relational operator>(numeric const & lh, ex const & rh);
120 relational operator>=(numeric const & lh, ex const & rh);
121
122 */
123
124 // input/output stream operators
125 ostream & operator<<(ostream & os, ex const & e);
126 istream & operator>>(istream & is, ex & e);
127
128 } // namespace GiNaC
129
130 #endif // ndef __GINAC_OPERATORS_H__