]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
- modified GiNaC headers to Alexander's liking
[ginac.git] / ginac / operators.h
1 /** @file operators.h
2  *
3  *  Interface to GiNaC's overloaded operators.
4  *
5  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
6  *
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.
11  *
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.
16  *
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
20  */
21
22 #ifndef __GINAC_OPERATORS_H__
23 #define __GINAC_OPERATORS_H__
24
25 #include <iostream>
26
27 class ex;
28 class numeric;
29 class relational;
30
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
37
38 /*
39
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
46
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
53
54 */
55
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);
61
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
68
69 /*
70   
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
77
78 */
79
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);
85
86 // unary operators
87 ex operator+(ex const & lh);
88 ex operator-(ex const & lh);
89
90 numeric operator+(numeric const & lh);
91 numeric operator-(numeric const & lh);
92
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);
100
101 /*
102
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);
110
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);
118
119 */
120
121 // input/output stream operators
122 ostream & operator<<(ostream & os, ex const & e);
123 istream & operator>>(istream & is, ex & e);
124
125 #endif // ndef __GINAC_OPERATORS_H__