|
GiNaC
1.6.2
|
00001 00005 /* 00006 * GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 #ifndef GINAC_OPERATORS_H 00024 #define GINAC_OPERATORS_H 00025 00026 #include <iosfwd> 00027 00028 namespace GiNaC { 00029 00030 class ex; 00031 class numeric; 00032 class relational; 00033 00034 // binary arithmetic operators ex with ex 00035 const ex operator+(const ex & lh, const ex & rh); 00036 const ex operator-(const ex & lh, const ex & rh); 00037 const ex operator*(const ex & lh, const ex & rh); 00038 const ex operator/(const ex & lh, const ex & rh); 00039 00040 // binary arithmetic operators numeric with numeric 00041 const numeric operator+(const numeric & lh, const numeric & rh); 00042 const numeric operator-(const numeric & lh, const numeric & rh); 00043 const numeric operator*(const numeric & lh, const numeric & rh); 00044 const numeric operator/(const numeric & lh, const numeric & rh); 00045 00046 // binary arithmetic assignment operators with ex 00047 ex & operator+=(ex & lh, const ex & rh); 00048 ex & operator-=(ex & lh, const ex & rh); 00049 ex & operator*=(ex & lh, const ex & rh); 00050 ex & operator/=(ex & lh, const ex & rh); 00051 00052 // binary arithmetic assignment operators with numeric 00053 numeric & operator+=(numeric & lh, const numeric & rh); 00054 numeric & operator-=(numeric & lh, const numeric & rh); 00055 numeric & operator*=(numeric & lh, const numeric & rh); 00056 numeric & operator/=(numeric & lh, const numeric & rh); 00057 00058 // unary operators 00059 const ex operator+(const ex & lh); 00060 const ex operator-(const ex & lh); 00061 00062 const numeric operator+(const numeric & lh); 00063 const numeric operator-(const numeric & lh); 00064 00065 // increment / decrement operators 00066 ex & operator++(ex & rh); 00067 ex & operator--(ex & rh); 00068 const ex operator++(ex & lh, int); 00069 const ex operator--(ex & lh, int); 00070 00071 numeric& operator++(numeric & rh); 00072 numeric& operator--(numeric & rh); 00073 const numeric operator++(numeric & lh, int); 00074 const numeric operator--(numeric & lh, int); 00075 00076 // binary relational operators ex with ex 00077 const relational operator==(const ex & lh, const ex & rh); 00078 const relational operator!=(const ex & lh, const ex & rh); 00079 const relational operator<(const ex & lh, const ex & rh); 00080 const relational operator<=(const ex & lh, const ex & rh); 00081 const relational operator>(const ex & lh, const ex & rh); 00082 const relational operator>=(const ex & lh, const ex & rh); 00083 00084 // input/output stream operators 00085 std::ostream & operator<<(std::ostream & os, const ex & e); 00086 std::istream & operator>>(std::istream & is, ex & e); 00087 00088 // input/output stream manipulators 00089 std::ostream & dflt(std::ostream & os); 00090 std::ostream & latex(std::ostream & os); 00091 std::ostream & python(std::ostream & os); 00092 std::ostream & python_repr(std::ostream & os); 00093 std::ostream & tree(std::ostream & os); 00094 std::ostream & csrc(std::ostream & os); // same as csrc_double 00095 std::ostream & csrc_float(std::ostream & os); 00096 std::ostream & csrc_double(std::ostream & os); 00097 std::ostream & csrc_cl_N(std::ostream & os); 00098 00099 std::ostream & index_dimensions(std::ostream & os); 00100 std::ostream & no_index_dimensions(std::ostream & os); 00101 00102 } // namespace GiNaC 00103 00104 #endif // ndef GINAC_OPERATORS_H