Hi! This time the changes are: (1) The implementation that is currently in CVS disregards that it is necessary to sort a container before applying algorithms such as set_union. (2) Don't rename indices if they both occur in one factor and no new dummy indices are subsed into that factor. (3) Introduced and documented a subs_options that switchs off dummy index renaming. (4) Use aforementioned option when symmetrizing expressions. Actually, I am not really entirely certain if this subs_option is the right way to go. On the one hand, the fact that constructing powers of expressions with summed indices automatically yields renamed results, suggest that we really want to consider index renaming as something that happens automatically without the user having to know anything about it. On the other hand, this may break existing code that wants to rename dummy indices. The problem is probably quite rare, though. One needs something like an ncmul in the mul to run into it. It is, of course, also possible to first just substitute and then check whether this leads to inconsistent indices and then, if necessary, to rename indices. This sounds inefficient, though. I would appreciate some input on this issue. Best, Chris
Hi Chris, Chris Dams wrote:
Actually, I am not really entirely certain if this subs_option is the right way to go. On the one hand, the fact that constructing powers of
I would appreciate some input on this issue.
is the new subs_option only to conserve compability with unknown user programs (sorry, I didn't dig into the patch code yet) ?
expressions with summed indices automatically yields renamed results, suggest that we really want to consider index renaming as something that happens automatically without the user having to know anything about it.
Yes.
On the other hand, this may break existing code that wants to rename dummy indices. The problem is probably quite rare, though. One needs something
I don't know of any existing code that would break. Anyhow, I would vote for breaking compatability in this case. Regards, Jens
Dear Jens, On Tue, 8 Nov 2005, Jens Vollinga wrote:
Chris Dams wrote:
Actually, I am not really entirely certain if this subs_option is the right way to go. On the one hand, the fact that constructing powers of
I would appreciate some input on this issue.
is the new subs_option only to conserve compability with unknown user programs (sorry, I didn't dig into the patch code yet) ?
Also with GiNaCs own symmetrization over dummy indices (as done by simplify_indexed). Clearly it is wrong to rename the dummy indices in this case. Best, Chris
participants (2)
-
Chris Dams
-
Jens Vollinga