This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Converting a dynamic sparse matrix to a sparse matrix

Tags: None
(comma "," separated)
Tarek
Registered Member
Posts
12
Karma
0
Does a dynamic sparse matrix have _outerIndexPtr(), _innerIndexPtr() and _valuePtr() attributes? and if not, then I guess I have to convert it to a normal sparse matrix and then use these attributes, but then is there a way to do that without first copying it to a new matrix and then deleting the dynamic sparse matrix ?? This would be useful for very large matrices.
Thanks
Tarek
Registered Member
Posts
12
Karma
0
Another question: Is insertion into a dynamic sparse matrix thread safe ?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Two threads cannot write to the same column of a column major DynamicSparseMatrix. Todo so you have to manually use a mutex.

Regarding your first question, you got it right.
Tarek
Registered Member
Posts
12
Karma
0
Hi ggael,
Thanks for the reply. Regarding my first question, Can we convert DynamicSparseMatrix to SparseMatrix directly without copying?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
nope, they are totally different kind of objects.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]