]> www.ginac.de Git - ginac.git/blobdiff - ginac/ex.h
dummy index renamer ignores index dimensions
[ginac.git] / ginac / ex.h
index f59cd7aea21b5486a3aee142067b0350d3487467..14cfd5b54eb1f1ae8b6c3561bdd81a6520954ff2 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2003 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
@@ -89,10 +89,11 @@ public:
        ex(long i);
        ex(unsigned long i);
        ex(double const d);
+
        /** Construct ex from string and a list of symbols. The input grammar is
-        *  similar to the GiNaC output format. All symbols to be used in the
-        *  expression must be specified in a lst in the second argument. Undefined
-        *  symbols and other parser errors will throw an exception. */
+        *  similar to the GiNaC output format. All symbols and indices to be used
+        *  in the expression must be specified in a lst in the second argument.
+        *  Undefined symbols and other parser errors will throw an exception. */
        ex(const std::string &s, const ex &l);
        
        // non-virtual functions in this class
@@ -483,6 +484,10 @@ struct ex_is_equal : public std::binary_function<ex, ex, bool> {
        bool operator() (const ex &lh, const ex &rh) const { return lh.is_equal(rh); }
 };
 
+struct op0_is_equal : public std::binary_function<ex, ex, bool> {
+       bool operator() (const ex &lh, const ex &rh) const { return lh.op(0).is_equal(rh.op(0)); }
+};
+
 struct ex_swap : public std::binary_function<ex, ex, void> {
        void operator() (ex &lh, ex &rh) const { lh.swap(rh); }
 };