]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.h
- added symmetrize() and antisymmetrize() functions
[ginac.git] / ginac / indexed.h
index 0147185ddd4630183ee7e78b23db134015fccadd..fd85b8db25cfa055805e78a2547d63b40229b273 100644 (file)
@@ -39,8 +39,8 @@ class indexed : public exprseq
 {
        GINAC_DECLARE_REGISTERED_CLASS(indexed, exprseq)
 
-       friend ex simplify_indexed(const ex & e, exvector & free_indices, const scalar_products & sp);
-       friend ex simplify_indexed_product(const ex & e, exvector & free_indices, const scalar_products & sp);
+       friend ex simplify_indexed(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp);
+       friend ex simplify_indexed_product(const ex & e, exvector & free_indices, exvector & dummy_indices, const scalar_products & sp);
 
        // types
 public:
@@ -184,6 +184,10 @@ public:
         *  another indexed object. */
        exvector get_dummy_indices(const indexed & other) const;
 
+       /** Check whether the object has an index that forms a dummy index pair
+        *  with a given index. */
+       bool has_dummy_index_for(const ex & i) const;
+
 protected:
        void printindices(const print_context & c, unsigned level) const;
        void assert_all_indices_of_type_idx(void) const;
@@ -259,6 +263,11 @@ ex simplify_indexed(const ex & e);
  *  @return simplified expression */
 ex simplify_indexed(const ex & e, const scalar_products & sp);
 
+/** Symmetrize expression over its free indices. */
+ex symmetrize(const ex & e);
+
+/** Antisymmetrize expression over its free indices. */
+ex antisymmetrize(const ex & e);
 
 } // namespace GiNaC