blanking out rows and columns
"Michael Nielsen" <[email protected]> Tue, 31 May 2005 09:46:02 +0200
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <000901c565b4$cbb43230$0200000a@mbn> |
Hi! I'm using some large sparse matrices, at points in my code i have to "blank out" rows and columns. With that i mean i have my large sparse matrix, and i want a number, around 10% of the rows and columns maximum, of those blanked out to resemble the identity matrix. Rows and columns are always tied together, so if i want row i blanked, i will also want column i blanked. Example: 1 2 3 1 0 3 4 5 6 => 0 1 0 7 8 9 7 0 9 In this example i have blanked row and column 1, 1 on the diagonal and 0 on all other entries. The question is, how do i do this the fastest using MTL? It is pure horror if i just iterate through it using a for(i = x; i < y; i++). I hope you can help me out :) /Michael _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/