ott
ott copied to clipboard
Was #209: Subset rows/columns/block of OT matrix
As suggested by @bosr, provide functions to subset transport matrices (i.e. materialize lines, or columns, or a block of out.matrix
without requiring the materialization of the entire matrix.
At this moment, lines and columns can be recovered through the apply
function, executed on vectors of the canonical basis. Although this is not efficient (quadratic time operation) this could be a start, and one that is generic enough to fit any geometry
(notably grid
). A block is slightly more complicated, but could be also handled using that strategy. Finally for point clouds one can use the subset
functions.