
Hello everybody, I have a question on ublas::compressed_matrix. I need to build a submatrix of a compressed_matrix. This should also be a compressed_matrix composed out of different rows of the original matrix. I have a std::set containing all row-indicis of the original matrix rows the submatrix should contain. Here is my problem, I can't find a way to do this. I know that there is a way to get rows out of a matrix. But these are dense rows -> too much unneeded data (Is there a way to insert complete rows at all?). Is there a way to copy a row of a compressed_matrix as compressed_vector and insert the vector in another compressed_matrix? I also thought about extracting only the values!=0 of the individual rows like here: http://guwi17.de/ublas/matrix_sparse_usage.html but I don't want to iterate over all rows and test if the set contains the rowindex. It would be very nice, if someone could give me a hint how to solve this problem. Thanks and regards Bastian