]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
Hunted down some output bugs. Hope it can be safely piped into Maple now.
[ginac.git] / ginac / operators.h
1 /** @file operators.h
2  *
3  *  Interface to GiNaC's overloaded operators. */
4
5 #ifndef _OPERATORS_H_
6 #define _OPERATORS_H_
7
8 #include <iostream>
9 #include "basic.h"
10 #include "ex.h"
11 #include "numeric.h"
12 #include "relational.h"
13
14
15 // binary arithmetic operators ex with ex
16 ex operator+(ex const & lh, ex const & rh);
17 ex operator-(ex const & lh, ex const & rh);
18 ex operator*(ex const & lh, ex const & rh);
19 ex operator/(ex const & lh, ex const & rh);
20 ex operator%(ex const & lh, ex const & rh); // non-commutative multiplication
21
22 /*
23
24 // binary arithmetic operators ex with numeric
25 ex operator+(ex const & lh, numeric const & rh);
26 ex operator-(ex const & lh, numeric const & rh);
27 ex operator*(ex const & lh, numeric const & rh);
28 ex operator/(ex const & lh, numeric const & rh);
29 ex operator%(ex const & lh, numeric const & rh); // non-commutative multiplication
30
31 // binary arithmetic operators numeric with ex
32 ex operator+(numeric const & lh, ex const & rh);
33 ex operator-(numeric const & lh, ex const & rh);
34 ex operator*(numeric const & lh, ex const & rh);
35 ex operator/(numeric const & lh, ex const & rh);
36 ex operator%(numeric const & lh, ex const & rh); // non-commutative multiplication
37
38 */
39
40 // binary arithmetic operators numeric with numeric
41 numeric operator+(numeric const & lh, numeric const & rh);
42 numeric operator-(numeric const & lh, numeric const & rh);
43 numeric operator*(numeric const & lh, numeric const & rh);
44 numeric operator/(numeric const & lh, numeric const & rh);
45
46 // binary arithmetic assignment operators with ex
47 ex const & operator+=(ex & lh, ex const & rh);
48 ex const & operator-=(ex & lh, ex const & rh);
49 ex const & operator*=(ex & lh, ex const & rh);
50 ex const & operator/=(ex & lh, ex const & rh);
51 ex const & operator%=(ex & lh, ex const & rh); // non-commutative multiplication
52
53 /*
54   
55 // binary arithmetic assignment operators with numeric
56 ex const & operator+=(ex & lh, numeric const & rh);
57 ex const & operator-=(ex & lh, numeric const & rh);
58 ex const & operator*=(ex & lh, numeric const & rh);
59 ex const & operator/=(ex & lh, numeric const & rh);
60 ex const & operator%=(ex & lh, numeric const & rh); // non-commutative multiplication
61
62 */
63
64 // binary arithmetic assignment operators with numeric
65 numeric const & operator+=(numeric & lh, numeric const & rh);
66 numeric const & operator-=(numeric & lh, numeric const & rh);
67 numeric const & operator*=(numeric & lh, numeric const & rh);
68 numeric const & operator/=(numeric & lh, numeric const & rh);
69
70 // unary operators
71 ex operator+(ex const & lh);
72 ex operator-(ex const & lh);
73
74 numeric operator+(numeric const & lh);
75 numeric operator-(numeric const & lh);
76
77 // binary relational operators ex with ex
78 relational operator==(ex const & lh, ex const & rh);
79 relational operator!=(ex const & lh, ex const & rh);
80 relational operator<(ex const & lh, ex const & rh);
81 relational operator<=(ex const & lh, ex const & rh);
82 relational operator>(ex const & lh, ex const & rh);
83 relational operator>=(ex const & lh, ex const & rh);
84
85 /*
86
87 // binary relational operators ex with numeric
88 relational operator==(ex const & lh, numeric const & rh);
89 relational operator!=(ex const & lh, numeric const & rh);
90 relational operator<(ex const & lh, numeric const & rh);
91 relational operator<=(ex const & lh, numeric const & rh);
92 relational operator>(ex const & lh, numeric const & rh);
93 relational operator>=(ex const & lh, numeric const & rh);
94
95 // binary relational operators numeric with ex
96 relational operator==(numeric const & lh, ex const & rh);
97 relational operator!=(numeric const & lh, ex const & rh);
98 relational operator<(numeric const & lh, ex const & rh);
99 relational operator<=(numeric const & lh, ex const & rh);
100 relational operator>(numeric const & lh, ex const & rh);
101 relational operator>=(numeric const & lh, ex const & rh);
102
103 */
104
105 // input/output stream operators
106 ostream & operator<<(ostream & os, ex const & e);
107 istream & operator>>(istream & is, ex & e);
108
109 #endif // ndef _OPERATORS_H_
110