Description
I was reading carefully the PyLops paper that @goretkin mentioned in #98, and noticed that there might be some interest in operators that restrict/sample vectors, y = x[I]
, whose transpose/adjoint can be interpreted as an embedding y[I] .= x
. Interestingly, in that paper they show that their sampling operator is basically as fast as the corresponding multiplication with the corresponding sparse matrix (the authors even compare to the multiplication with a dense sampling matrix and seem to make the case that avoiding to store the matrix is of great benefit). I was curious if we can both avoid storing the matrix and have faster performance compared to the sparse matrix approach, as it should be! Of course, this has nothing to do with LinearMaps.jl
, but all with array indexing handled by Julia Base, but still, and it's possible, of course.
This is all trivial and I don't want to blow up this package unnecessarily. But if there's interest, this could be a cute addition.
This is somewhat related to #65, but cannot replace it, since we wouldn't want to represent an IndexMap
as the product E*A*R
of a transpose restriction map/embedding map E
, a linear map A
, and a restriction map R
(to avoid the intermediate "copies"), but have the indexing included. Thumbs up or down for adding it?