]> www.ginac.de Git - ginac.git/blobdiff - ginac/operators.h
documentation update
[ginac.git] / ginac / operators.h
index 47d1b745a3602aba91fda96b891cb337fc5ca5f2..9c37506d24f3a2f6fc57d4e555240ca97676f8a3 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's overloaded operators. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2002 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 <iostream>
+#include <iosfwd>
 
 namespace GiNaC {
 
@@ -32,47 +32,54 @@ 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);
+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);
+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);