]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
- enforced GiNaC coding standards :-)
[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 // binary arithmetic operators ex with ex
28 ex operator+(ex const & lh, ex const & rh);
29 ex operator-(ex const & lh, ex const & rh);
30 ex operator*(ex const & lh, ex const & rh);
31 ex operator/(ex const & lh, ex const & rh);
32 ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication
33
34 /*
35
36 // binary arithmetic operators ex with numeric
37 ex operator+(ex const & lh, numeric const & rh);
38 ex operator-(ex const & lh, numeric const & rh);
39 ex operator*(ex const & lh, numeric const & rh);
40 ex operator/(ex const & lh, numeric const & rh);
41 ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication
42
43 // binary arithmetic operators numeric with ex
44 ex operator+(numeric const & lh, ex const & rh);
45 ex operator-(numeric const & lh, ex const & rh);
46 ex operator*(numeric const & lh, ex const & rh);
47 ex operator/(numeric const & lh, ex const & rh);
48 ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication
49
50 */
51
52 // binary arithmetic operators numeric with numeric
53 numeric operator+(numeric const & lh, numeric const & rh);
54 numeric operator-(numeric const & lh, numeric const & rh);
55 numeric operator*(numeric const & lh, numeric const & rh);
56 numeric operator/(numeric const & lh, numeric const & rh);
57
58 // binary arithmetic assignment operators with ex
59 ex const & operator+=(ex & lh, ex const & rh);
60 ex const & operator-=(ex & lh, ex const & rh);
61 ex const & operator*=(ex & lh, ex const & rh);
62 ex const & operator/=(ex & lh, ex const & rh);
63 ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication
64
65 /*
66   
67 // binary arithmetic assignment operators with numeric
68 ex const & operator+=(ex & lh, numeric const & rh);
69 ex const & operator-=(ex & lh, numeric const & rh);
70 ex const & operator*=(ex & lh, numeric const & rh);
71 ex const & operator/=(ex & lh, numeric const & rh);
72 ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication
73
74 */
75
76 // binary arithmetic assignment operators with numeric
77 numeric const & operator+=(numeric & lh, numeric const & rh);
78 numeric const & operator-=(numeric & lh, numeric const & rh);
79 numeric const & operator*=(numeric & lh, numeric const & rh);
80 numeric const & operator/=(numeric & lh, numeric const & rh);
81
82 // unary operators
83 ex operator+(ex const & lh);
84 ex operator-(ex const & lh);
85
86 numeric operator+(numeric const & lh);
87 numeric operator-(numeric const & lh);
88
89 // binary relational operators ex with ex
90 relational operator==(ex const & lh, ex const & rh);
91 relational operator!=(ex const & lh, ex const & rh);
92 relational operator<(ex const & lh, ex const & rh);
93 relational operator<=(ex const & lh, ex const & rh);
94 relational operator>(ex const & lh, ex const & rh);
95 relational operator>=(ex const & lh, ex const & rh);
96
97 /*
98
99 // binary relational operators ex with numeric
100 relational operator==(ex const & lh, numeric const & rh);
101 relational operator!=(ex const & lh, numeric const & rh);
102 relational operator<(ex const & lh, numeric const & rh);
103 relational operator<=(ex const & lh, numeric const & rh);
104 relational operator>(ex const & lh, numeric const & rh);
105 relational operator>=(ex const & lh, numeric const & rh);
106
107 // binary relational operators numeric with ex
108 relational operator==(numeric const & lh, ex const & rh);
109 relational operator!=(numeric const & lh, ex const & rh);
110 relational operator<(numeric const & lh, ex const & rh);
111 relational operator<=(numeric const & lh, ex const & rh);
112 relational operator>(numeric const & lh, ex const & rh);
113 relational operator>=(numeric const & lh, ex const & rh);
114
115 */
116
117 // input/output stream operators
118 ostream & operator<<(ostream & os, ex const & e);
119 istream & operator>>(istream & is, ex & e);
120
121 #endif // ndef __GINAC_OPERATORS_H__