iterator for sparse matrix
"Ricardo Luiz S Adriano" <[email protected]> Wed, 19 Oct 2005 13:39:15 -0200
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <007801c5d4c3$42da4840$0304000a@homer> |
Hi,
I need some help to use iteratiors for sparse matrix.
I define my matrix as:
typedef mtl::matrix<std::complex<double>,mtl::rectangle<>,mtl::compressed<>,mtl::row_major >::type MyMatrix;
and I can only cover the matix elements using
for (int i=0; i<n,i++){
for (int j=0; j<n,j++){
x = A(i,j);
}
}
it is very time expensive because my matrix is sparse and i want only get the nonzero elements.
Do you have any idea how I can solve this problem using interator. thank you for any hints!
Regards,
Ricardo
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/