]> www.ginac.de Git - ginac.git/blob - ginac/operators.h
- killed old add::print
[ginac.git] / ginac / operators.h
1 /** @file operators.h
2  *
3  *  Interface to GiNaC's overloaded operators. */
4
5 /*
6  *  GiNaC Copyright (C) 1999-2000 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 #ifndef NO_GINAC_NAMESPACE
29 namespace GiNaC {
30 #endif // ndef NO_GINAC_NAMESPACE
31
32 class ex;
33 class numeric;
34 class relational;
35
36 // binary arithmetic operators ex with ex
37 ex operator+(const ex & lh, const ex & rh);
38 ex operator-(const ex & lh, const ex & rh);
39 ex operator*(const ex & lh, const ex & rh);
40 ex operator/(const ex & lh, const ex & rh);
41 ex operator%(const ex & lh, const ex & rh); // non-commutative multiplication
42
43 // binary arithmetic operators numeric with numeric
44 numeric operator+(const numeric & lh, const numeric & rh);
45 numeric operator-(const numeric & lh, const numeric & rh);
46 numeric operator*(const numeric & lh, const numeric & rh);
47 numeric operator/(const numeric & lh, const numeric & rh);
48
49 // binary arithmetic assignment operators with ex
50 const ex & operator+=(ex & lh, const ex & rh);
51 const ex & operator-=(ex & lh, const ex & rh);
52 const ex & operator*=(ex & lh, const ex & rh);
53 const ex & operator/=(ex & lh, const ex & rh);
54 const ex & operator%=(ex & lh, const ex & rh); // non-commutative multiplication
55
56 // binary arithmetic assignment operators with numeric
57 const numeric & operator+=(numeric & lh, const numeric & rh);
58 const numeric & operator-=(numeric & lh, const numeric & rh);
59 const numeric & operator*=(numeric & lh, const numeric & rh);
60 const numeric & operator/=(numeric & lh, const numeric & rh);
61
62 // unary operators
63 ex operator+(const ex & lh);
64 ex operator-(const ex & lh);
65
66 numeric operator+(const numeric & lh);
67 numeric operator-(const numeric & lh);
68 numeric& operator++(numeric & rh);
69 numeric& operator--(numeric & rh);
70 numeric operator++(numeric & lh, int);
71 numeric operator--(numeric & lh, int);
72
73 // binary relational operators ex with ex
74 relational operator==(const ex & lh, const ex & rh);
75 relational operator!=(const ex & lh, const ex & rh);
76 relational operator<(const ex & lh, const ex & rh);
77 relational operator<=(const ex & lh, const ex & rh);
78 relational operator>(const ex & lh, const ex & rh);
79 relational operator>=(const ex & lh, const ex & rh);
80
81 // input/output stream operators
82 ostream & operator<<(ostream & os, const ex & e);
83 istream & operator>>(istream & is, ex & e);
84
85 #ifndef NO_GINAC_NAMESPACE
86 } // namespace GiNaC
87 #endif // ndef NO_GINAC_NAMESPACE
88
89 #endif // ndef __GINAC_OPERATORS_H__