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

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