X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Foperators.h;h=b9b8ed08adc69124ebabd04e01d5238752f95a12;hp=8636e212d5922cf3ffbdfbd5af05e4caf044409a;hb=f6739585e96e8be7f52229215720ed29164e8024;hpb=4e3a4ac2bcb0837611ea31bc8fc05d84a20c33ac diff --git a/ginac/operators.h b/ginac/operators.h index 8636e212..b9b8ed08 100644 --- a/ginac/operators.h +++ b/ginac/operators.h @@ -3,7 +3,7 @@ * Interface to GiNaC's overloaded operators. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ #ifndef __GINAC_OPERATORS_H__ #define __GINAC_OPERATORS_H__ -#include +#include namespace GiNaC { @@ -32,54 +32,73 @@ class numeric; class relational; // binary arithmetic operators ex with ex -ex operator+(const ex & lh, const ex & rh); -ex operator-(const ex & lh, const ex & rh); -ex operator*(const ex & lh, const ex & rh); -ex operator/(const ex & lh, const ex & rh); -ex operator%(const ex & lh, const ex & rh); // non-commutative multiplication +const ex operator+(const ex & lh, const ex & rh); +const ex operator-(const ex & lh, const ex & rh); +const ex operator*(const ex & lh, const ex & rh); +const ex operator/(const ex & lh, const ex & rh); // binary arithmetic operators numeric with numeric -numeric operator+(const numeric & lh, const numeric & rh); -numeric operator-(const numeric & lh, const numeric & rh); -numeric operator*(const numeric & lh, const numeric & rh); -numeric operator/(const numeric & lh, const numeric & rh); +const numeric operator+(const numeric & lh, const numeric & rh); +const numeric operator-(const numeric & lh, const numeric & rh); +const numeric operator*(const numeric & lh, const numeric & rh); +const numeric operator/(const numeric & lh, const numeric & rh); // binary arithmetic assignment operators with ex -const ex & operator+=(ex & lh, const ex & rh); -const ex & operator-=(ex & lh, const ex & rh); -const ex & operator*=(ex & lh, const ex & rh); -const ex & operator/=(ex & lh, const ex & rh); -const ex & operator%=(ex & lh, const ex & rh); // non-commutative multiplication +ex & operator+=(ex & lh, const ex & rh); +ex & operator-=(ex & lh, const ex & rh); +ex & operator*=(ex & lh, const ex & rh); +ex & operator/=(ex & lh, const ex & rh); // binary arithmetic assignment operators with numeric -const numeric & operator+=(numeric & lh, const numeric & rh); -const numeric & operator-=(numeric & lh, const numeric & rh); -const numeric & operator*=(numeric & lh, const numeric & rh); -const numeric & operator/=(numeric & lh, const numeric & rh); +numeric & operator+=(numeric & lh, const numeric & rh); +numeric & operator-=(numeric & lh, const numeric & rh); +numeric & operator*=(numeric & lh, const numeric & rh); +numeric & operator/=(numeric & lh, const numeric & rh); // unary operators -ex operator+(const ex & lh); -ex operator-(const ex & lh); +const ex operator+(const ex & lh); +const ex operator-(const ex & lh); + +const numeric operator+(const numeric & lh); +const numeric operator-(const numeric & lh); + +// increment / decrement operators +ex & operator++(ex & rh); +ex & operator--(ex & rh); +const ex operator++(ex & lh, int); +const ex operator--(ex & lh, int); -numeric operator+(const numeric & lh); -numeric operator-(const numeric & lh); numeric& operator++(numeric & rh); numeric& operator--(numeric & rh); -numeric operator++(numeric & lh, int); -numeric operator--(numeric & lh, int); +const numeric operator++(numeric & lh, int); +const numeric operator--(numeric & lh, int); // binary relational operators ex with ex -relational operator==(const ex & lh, const ex & rh); -relational operator!=(const ex & lh, const ex & rh); -relational operator<(const ex & lh, const ex & rh); -relational operator<=(const ex & lh, const ex & rh); -relational operator>(const ex & lh, const ex & rh); -relational operator>=(const ex & lh, const ex & rh); +const relational operator==(const ex & lh, const ex & rh); +const relational operator!=(const ex & lh, const ex & rh); +const relational operator<(const ex & lh, const ex & rh); +const relational operator<=(const ex & lh, const ex & rh); +const relational operator>(const ex & lh, const ex & rh); +const relational operator>=(const ex & lh, const ex & rh); // input/output stream operators std::ostream & operator<<(std::ostream & os, const ex & e); std::istream & operator>>(std::istream & is, ex & e); +// input/output stream manipulators +std::ostream & dflt(std::ostream & os); +std::ostream & latex(std::ostream & os); +std::ostream & python(std::ostream & os); +std::ostream & python_repr(std::ostream & os); +std::ostream & tree(std::ostream & os); +std::ostream & csrc(std::ostream & os); // same as csrc_double +std::ostream & csrc_float(std::ostream & os); +std::ostream & csrc_double(std::ostream & os); +std::ostream & csrc_cl_N(std::ostream & os); + +std::ostream & index_dimensions(std::ostream & os); +std::ostream & no_index_dimensions(std::ostream & os); + } // namespace GiNaC #endif // ndef __GINAC_OPERATORS_H__