[GiNaC-devel] Improvements for dummy index renaming.

Chris Dams Chris.Dams at mi.infn.it
Fri Dec 16 15:33:53 CET 2005


Dear all,

I found out that the function get_all_dummy_indices only really gets all
dummy indices if the it acts on something that is expanded (i.e., it works
fine when called form simplify_indexed). However, if it is called from the
new index renaming code, it does not see dummy indices that occur in a
factor that looks, for instance like (A.i*A.i+alpha). To make this work, I
added a new function get_all_dummy_indices_safely which is more costly
computatunally but is supposed to really get always all dummy indices.

Other changes:
(1) Removed power::get_free_indices(). It is a bad idea that and index
inside a power could be contracted with something.  Therefore it should
not be considered a free index. Besides, now that all dummy indices are
found, this would break algebraic substitutions when used for something
like U.i.j*Uinv.j.k==delta.i.k.
(2) As mentioned in the "Note:" of my previous mail, removed the try/catch 
block that was introduce there. Now we do not try to look up inner 
products of expressions with more than one index.
(3) Please don't cast an expession to a lst with (lst)expression. This is
undefined behaviour and at my place it does not work as intended. What was
the purpose of ex_to<whatever> again?

Best,
Chris



More information about the GiNaC-devel mailing list