[GiNaC-devel] Proposal: matrices may no longer be given varidxes.
Chris Dams
Chris.Dams at mi.infn.it
Fri Aug 18 14:11:42 CEST 2006
Dear Vladimir,
On Thu, 17 Aug 2006, Vladimir Kisil wrote:
> With the present state I can use M.i.i to denote a generic diagonal
> element of M and M.i~i---the sum of all such elements. Certainly other
> users may think on other application of such a freedom.
Well, we have recently seen that doing that kind of misuse is a bit
dangerous, havn't we? Something like this can break rather easily if new
functionality is added to the library. Therefore, I think helping the user
a bit by explicitly forbidding dangerous expressions is beneficial.
For what you want to do, I would suggest to introduce a symbolic function,
say "nosum" and to write M.nosum(i).nosum(i). That should be safe. Well,
at least as long as there are no other i's hanging around...
Vladimirs opinion has been noted. Do other people have other/the same
opions available?
Best wishes,
Chris
More information about the GiNaC-devel
mailing list