GiNaC  1.8.0
operators.h
Go to the documentation of this file.
1 
5 /*
6  * GiNaC Copyright (C) 1999-2020 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef GINAC_OPERATORS_H
24 #define GINAC_OPERATORS_H
25 
26 #include <iosfwd>
27 
28 namespace GiNaC {
29 
30 class ex;
31 class numeric;
32 class relational;
33 
34 // binary arithmetic operators ex with ex
35 const ex operator+(const ex & lh, const ex & rh);
36 const ex operator-(const ex & lh, const ex & rh);
37 const ex operator*(const ex & lh, const ex & rh);
38 const ex operator/(const ex & lh, const ex & rh);
39 
40 // binary arithmetic operators numeric with numeric
41 const numeric operator+(const numeric & lh, const numeric & rh);
42 const numeric operator-(const numeric & lh, const numeric & rh);
43 const numeric operator*(const numeric & lh, const numeric & rh);
44 const numeric operator/(const numeric & lh, const numeric & rh);
45 
46 // binary arithmetic assignment operators with ex
47 ex & operator+=(ex & lh, const ex & rh);
48 ex & operator-=(ex & lh, const ex & rh);
49 ex & operator*=(ex & lh, const ex & rh);
50 ex & operator/=(ex & lh, const ex & rh);
51 
52 // binary arithmetic assignment operators with numeric
53 numeric & operator+=(numeric & lh, const numeric & rh);
54 numeric & operator-=(numeric & lh, const numeric & rh);
55 numeric & operator*=(numeric & lh, const numeric & rh);
56 numeric & operator/=(numeric & lh, const numeric & rh);
57 
58 // unary operators
59 const ex operator+(const ex & lh);
60 const ex operator-(const ex & lh);
61 
62 const numeric operator+(const numeric & lh);
63 const numeric operator-(const numeric & lh);
64 
65 // increment / decrement operators
66 ex & operator++(ex & rh);
67 ex & operator--(ex & rh);
68 const ex operator++(ex & lh, int);
69 const ex operator--(ex & lh, int);
70 
71 numeric& operator++(numeric & rh);
72 numeric& operator--(numeric & rh);
73 const numeric operator++(numeric & lh, int);
74 const numeric operator--(numeric & lh, int);
75 
76 // binary relational operators ex with ex
77 const relational operator==(const ex & lh, const ex & rh);
78 const relational operator!=(const ex & lh, const ex & rh);
79 const relational operator<(const ex & lh, const ex & rh);
80 const relational operator<=(const ex & lh, const ex & rh);
81 const relational operator>(const ex & lh, const ex & rh);
82 const relational operator>=(const ex & lh, const ex & rh);
83 
84 // input/output stream operators
85 std::ostream & operator<<(std::ostream & os, const ex & e);
86 std::istream & operator>>(std::istream & is, ex & e);
87 
88 // input/output stream manipulators
89 std::ostream & dflt(std::ostream & os);
90 std::ostream & latex(std::ostream & os);
91 std::ostream & python(std::ostream & os);
92 std::ostream & python_repr(std::ostream & os);
93 std::ostream & tree(std::ostream & os);
94 std::ostream & csrc(std::ostream & os); // same as csrc_double
95 std::ostream & csrc_float(std::ostream & os);
96 std::ostream & csrc_double(std::ostream & os);
97 std::ostream & csrc_cl_N(std::ostream & os);
98 
99 std::ostream & index_dimensions(std::ostream & os);
100 std::ostream & no_index_dimensions(std::ostream & os);
101 
102 } // namespace GiNaC
103 
104 #endif // ndef GINAC_OPERATORS_H
GiNaC::operator--
ex & operator--(ex &rh)
Expression prefix decrement.
Definition: operators.cpp:191
GiNaC::no_index_dimensions
std::ostream & no_index_dimensions(std::ostream &os)
Definition: operators.cpp:504
GiNaC::operator+=
ex & operator+=(ex &lh, const ex &rh)
Definition: operators.cpp:111
GiNaC::dflt
std::ostream & dflt(std::ostream &os)
Definition: operators.cpp:443
GiNaC::operator++
ex & operator++(ex &rh)
Expression prefix increment.
Definition: operators.cpp:185
GiNaC::operator*=
ex & operator*=(ex &lh, const ex &rh)
Definition: operators.cpp:121
GiNaC::operator/
const ex operator/(const ex &lh, const ex &rh)
Definition: operators.cpp:80
GiNaC::python_repr
std::ostream & python_repr(std::ostream &os)
Definition: operators.cpp:462
GiNaC
Definition: add.cpp:38
GiNaC::operator<<
std::ostream & operator<<(std::ostream &os, const archive_node &n)
Write archive_node to binary data stream.
Definition: archive.cpp:200
GiNaC::python
std::ostream & python(std::ostream &os)
Definition: operators.cpp:456
GiNaC::operator>=
const relational operator>=(const ex &lh, const ex &rh)
Definition: operators.cpp:273
GiNaC::latex
std::ostream & latex(std::ostream &os)
Definition: operators.cpp:450
GiNaC::csrc_cl_N
std::ostream & csrc_cl_N(std::ostream &os)
Definition: operators.cpp:492
GiNaC::csrc_double
std::ostream & csrc_double(std::ostream &os)
Definition: operators.cpp:486
GiNaC::operator>
const relational operator>(const ex &lh, const ex &rh)
Definition: operators.cpp:268
GiNaC::operator<
const relational operator<(const ex &lh, const ex &rh)
Definition: operators.cpp:258
GiNaC::operator-=
ex & operator-=(ex &lh, const ex &rh)
Definition: operators.cpp:116
GiNaC::csrc_float
std::ostream & csrc_float(std::ostream &os)
Definition: operators.cpp:480
GiNaC::operator-
const ex operator-(const ex &lh, const ex &rh)
Definition: operators.cpp:70
GiNaC::operator>>
std::istream & operator>>(std::istream &is, archive_node &n)
Read archive_node from binary data stream.
Definition: archive.cpp:245
GiNaC::operator/=
ex & operator/=(ex &lh, const ex &rh)
Definition: operators.cpp:126
GiNaC::operator*
const ex operator*(const ex &lh, const ex &rh)
Definition: operators.cpp:75
GiNaC::tree
std::ostream & tree(std::ostream &os)
Definition: operators.cpp:468
GiNaC::operator!=
const relational operator!=(const ex &lh, const ex &rh)
Definition: operators.cpp:253
GiNaC::operator<=
const relational operator<=(const ex &lh, const ex &rh)
Definition: operators.cpp:263
GiNaC::index_dimensions
std::ostream & index_dimensions(std::ostream &os)
Definition: operators.cpp:498
GiNaC::csrc
std::ostream & csrc(std::ostream &os)
Definition: operators.cpp:474
GiNaC::operator==
const relational operator==(const ex &lh, const ex &rh)
Definition: operators.cpp:248
GiNaC::operator+
const ex operator+(const ex &lh, const ex &rh)
Definition: operators.cpp:65

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.