![]() Registered Member ![]()
|
Hi,
I'm doing least squares with quite large symmetric matrices (kernels) where many columns and rows are zero (but still mostly non-zero). Conceptually, if I could reorder the rows and columns, this would be a block matrix |X 0| |0 0| but it's not one yet so I can't use the nice matrix slicing/block operations. Are there any other options besides allocating a temporary matrix and copying all the non-zero elements to it? It is possible to make a view with a different ordering of columns and rows and run block operations on that? |
![]() Moderator ![]()
|
Since you're doing least-square solving, at some point you'll have to copy the re-ordered sub matrix anyway, so what I usually do is to apply a symmetric permutation A.twist(P) where P is a PermutationMatrix, and then take the upper-left-corner.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]