$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Kresimir Fresl (fresl_at_[hidden])
Date: 2002-04-16 04:24:21
Toon Knapen wrote:
> I'm looking for taking a view of a ublas matrix. What I mean is soth like :
> matrix< double > a(10,10);
> size_t row_indices[] = { 0, 3, 4, 9 };
> size_t column_indices[] = { 2, 3, 7 };
> matrix_view< matrix< double > > view( a,
> row_indices, row_indices + 4,
> column_indices, column_indices + 3 )
>
>
> to give me a 4*3 alias to the original matrix containing rows 0,3,4,9 and
> columns 2,3,7. Thus view(0,0) == a(0,2)
>
> AFAIK soth similar is not possible at the moment (if it is, please let me
> know) so I guess I'll give it a shot to implement it in ublas.
I am very interested in this functionality, so, yes, shoot ;o)
Since Joerg didn't reply, I will quote his earlier comment
on this topic (thread: `slicing and ranges of matrices', Jan. 24th):
``I believe, that it's difficult to estimate the complexity of
operations on such a view for sparse matrices (in other words: they
could be rather inefficient). May be we currently should be more
interested in some gather and scatter functionality for sparse
matrices.''
Sincerely,
fres