- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Of course, I know that A'A will produce a sparse symmetric matrix, but I cannot find any way to convert the output of this function into a symmetric CSR format, rather than a non-symmetric CSR format.

Is there a way to do this conversion without manually going in and removing entries from the values,cols,rowIndex arrays?

I think callingdss_define_structure withMKL_DSS_NON_SYMMETRIC option should speed things up due to memory re-use.

Thanks!

Oliver

Link Copied

3 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Of course, you can solve your matrix as unsymmetrical, but it would be definitelyslower to factorize it in comparison with the code for symmetrical matrices. Anyway, this way is simple and should work for you.

As for me, I don't know any routines that can help you (I mean special unsym->sym converters etc.). The only way here is to manually convert arrays - however, it doesn't seem hard, something like this:

ja_cnt=0;

ia_new[0]=1;

for(i=1;i

ia_cnt=0;

for(j=ia[i-1];j<ia

*;j++) {* if (ja[j-1]>=i) {

ja_new[ja_cnt]=ja[j-1];

a_new[ja_cnt]=a[j-1];

ja_cnt++;

ia_cnt++;

}

}

ia_new

*=ia_new[i-1]+ia_cnt;*}

Moreover, you can just overwrite old ja and a arrays, not allocating ja_new and a_new.

Regards,

Konstantin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

^{3}) for sparse matrix product, however it will depend of number of non-zeros.

D.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Regards,

Konstantin

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page