GiNaC 1.8.10
operators.h
Go to the documentation of this file.
1
5/*
6 * GiNaC Copyright (C) 1999-2026 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, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef GINAC_OPERATORS_H
23#define GINAC_OPERATORS_H
24
25#include <iosfwd>
26
27namespace GiNaC {
28
29class ex;
30class numeric;
31class relational;
32
33// binary arithmetic operators ex with ex
34const ex operator+(const ex & lh, const ex & rh);
35const ex operator-(const ex & lh, const ex & rh);
36const ex operator*(const ex & lh, const ex & rh);
37const ex operator/(const ex & lh, const ex & rh);
38
39// binary arithmetic operators numeric with numeric
40const numeric operator+(const numeric & lh, const numeric & rh);
41const numeric operator-(const numeric & lh, const numeric & rh);
42const numeric operator*(const numeric & lh, const numeric & rh);
43const numeric operator/(const numeric & lh, const numeric & rh);
44
45// binary arithmetic assignment operators with ex
46ex & operator+=(ex & lh, const ex & rh);
47ex & operator-=(ex & lh, const ex & rh);
48ex & operator*=(ex & lh, const ex & rh);
49ex & operator/=(ex & lh, const ex & rh);
50
51// binary arithmetic assignment operators with numeric
52numeric & operator+=(numeric & lh, const numeric & rh);
53numeric & operator-=(numeric & lh, const numeric & rh);
54numeric & operator*=(numeric & lh, const numeric & rh);
55numeric & operator/=(numeric & lh, const numeric & rh);
56
57// unary operators
58const ex operator+(const ex & lh);
59const ex operator-(const ex & lh);
60
61const numeric operator+(const numeric & lh);
62const numeric operator-(const numeric & lh);
63
64// increment / decrement operators
65ex & operator++(ex & rh);
66ex & operator--(ex & rh);
67const ex operator++(ex & lh, int);
68const ex operator--(ex & lh, int);
69
70numeric& operator++(numeric & rh);
71numeric& operator--(numeric & rh);
72const numeric operator++(numeric & lh, int);
73const numeric operator--(numeric & lh, int);
74
75// binary relational operators ex with ex
76const relational operator==(const ex & lh, const ex & rh);
77const relational operator!=(const ex & lh, const ex & rh);
78const relational operator<(const ex & lh, const ex & rh);
79const relational operator<=(const ex & lh, const ex & rh);
80const relational operator>(const ex & lh, const ex & rh);
81const relational operator>=(const ex & lh, const ex & rh);
82
83// input/output stream operators
84std::ostream & operator<<(std::ostream & os, const ex & e);
85std::istream & operator>>(std::istream & is, ex & e);
86
87// input/output stream manipulators
88std::ostream & dflt(std::ostream & os);
89std::ostream & latex(std::ostream & os);
90std::ostream & python(std::ostream & os);
91std::ostream & python_repr(std::ostream & os);
92std::ostream & tree(std::ostream & os);
93std::ostream & csrc(std::ostream & os); // same as csrc_double
94std::ostream & csrc_float(std::ostream & os);
95std::ostream & csrc_double(std::ostream & os);
96std::ostream & csrc_cl_N(std::ostream & os);
97
98std::ostream & index_dimensions(std::ostream & os);
99std::ostream & no_index_dimensions(std::ostream & os);
100
101} // namespace GiNaC
102
103#endif // ndef GINAC_OPERATORS_H
Definition add.cpp:35
std::ostream & operator<<(std::ostream &os, const archive_node &n)
Write archive_node to binary data stream.
Definition archive.cpp:198
std::ostream & python_repr(std::ostream &os)
const ex operator/(const ex &lh, const ex &rh)
Definition operators.cpp:77
std::ostream & dflt(std::ostream &os)
std::ostream & csrc_double(std::ostream &os)
ex & operator*=(ex &lh, const ex &rh)
std::ostream & latex(std::ostream &os)
ex & operator++(ex &rh)
Expression prefix increment.
const relational operator==(const ex &lh, const ex &rh)
ex & operator--(ex &rh)
Expression prefix decrement.
std::ostream & python(std::ostream &os)
const relational operator>(const ex &lh, const ex &rh)
std::ostream & index_dimensions(std::ostream &os)
const ex operator+(const ex &lh, const ex &rh)
Definition operators.cpp:62
const ex operator*(const ex &lh, const ex &rh)
Definition operators.cpp:72
std::ostream & csrc_cl_N(std::ostream &os)
const relational operator!=(const ex &lh, const ex &rh)
std::ostream & tree(std::ostream &os)
ex & operator+=(ex &lh, const ex &rh)
const relational operator<=(const ex &lh, const ex &rh)
std::istream & operator>>(std::istream &is, archive_node &n)
Read archive_node from binary data stream.
Definition archive.cpp:243
std::ostream & csrc(std::ostream &os)
std::ostream & no_index_dimensions(std::ostream &os)
const relational operator<(const ex &lh, const ex &rh)
const relational operator>=(const ex &lh, const ex &rh)
ex & operator/=(ex &lh, const ex &rh)
std::ostream & csrc_float(std::ostream &os)
const ex operator-(const ex &lh, const ex &rh)
Definition operators.cpp:67
ex & operator-=(ex &lh, const ex &rh)

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