On Sat, 2 Jan 2021, Sven Schreiber wrote:
Am 02.01.2021 um 18:46 schrieb Riccardo (Jack) Lucchetti:
> On Sat, 2 Jan 2021, Sven Schreiber wrote:
>
>> Perhaps we should add this to 'extra' as well?
>
> Sure, why not. Here's a version that encompasses the present discussion:
>
Oh my god, we're both officially old and forgetful. The duplicate()
function (written by someone whose initials are J.L.) was added to
'extra' in 2018 already!
(Along with the eliminate function.)
:/
We're getting old, mate.
However, there's also a use case for an efficient multiplication
with
the _transpose_ of the duplication matrix (so applied to a matrix with
n^2 rows).
Hm, do you have a use case for that? In most cases, what is needed is
premultimplication by its generalised inverse $D_n^+$, which we could also
write a function for, by and easy adaptation of your code.
On a more general note: the more I think about it, the more I feel
inclined to factor out all those functions from extra.gfn in favour of a
separate matrix_extra.gfn package, or something like that.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------