Am 25.01.2021 um 12:13 schrieb Riccardo (Jack) Lucchetti:
often. Specifically, the syntax I'm using is something like
Q = hdprod(X, X)
...
Now: I only need the non-repeated columns of Q. While this is easy
enough to accomplish by selecting the appropriate columns, it strikes me
as a very inefficient solution. In fact, each time you call hdprod()
with arguments 1 and 2 being equal, you get a matrix with (potentially)
lots of repeated columns and you perform the same multiplication more
times than you should.
Hence, my proposal: I'd like to modify hdprod() so that the second
argument becomes optional. If absent, it is understood to be equal to
the first one. In that case, the returned matrix will not have n^2
columns, but only n x (n-1)/2, arranged appropriately. Note that this
extension would be completely backward-compatible.
Note: I'm not tackling for the moment the case where one of the two
arguments may be complex; I guess this can wait.
Any objections to this plan?
Sounds good to me. Does this operation have a name in algebra?
cheers
sven