]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
- modified the comment blocks so the copyright message no longer appears in
[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 class ex;
29 class numeric;
30 class relational;
31
32 // binary arithmetic operators ex with ex
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);
37 ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication
38
39 /*
40
41 // binary arithmetic operators ex with numeric
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);
46 ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication
47
48 // binary arithmetic operators numeric with ex
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);
53 ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication
54
55 */
56
57 // binary arithmetic operators numeric with numeric
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 numeric operator/(numeric const & lh, numeric const & rh);
62
63 // binary arithmetic assignment operators with ex
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);
68 ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication
69
70 /*
71   
72 // binary arithmetic assignment operators with numeric
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);
77 ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication
78
79 */
80
81 // binary arithmetic assignment operators with numeric
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 numeric const & operator/=(numeric & lh, numeric const & rh);
86
87 // unary operators
88 ex operator+(ex const & lh);
89 ex operator-(ex const & lh);
90
91 numeric operator+(numeric const & lh);
92 numeric operator-(numeric const & lh);
93
94 // binary relational operators ex with ex
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 relational operator>=(ex const & lh, ex const & rh);
101
102 /*
103
104 // binary relational operators ex with numeric
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 relational operator>=(ex const & lh, numeric const & rh);
111
112 // binary relational operators numeric with ex
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 relational operator>=(numeric const & lh, ex const & rh);
119
120 */
121
122 // input/output stream operators
123 ostream & operator<<(ostream & os, ex const & e);
124 istream & operator>>(istream & is, ex & e);
125
126 #endif // ndef __GINAC_OPERATORS_H__