Registered Member
|
Are there any plans on implementing logical sparse matrices in Eigen? I.e. a matrix type where all nonzero entries are implicitly assumed to be one, the value-array is not stored.
For some applications, the power graph of the adjacency matrix are required, and storing the value-array leads to memory bloating and also performance degradation. |
Registered Member
|
Can't you use a boolean sparse with negative logic?
|
Registered Member
|
What would negative logic entail?
If I use a boolean sparse, I believe the array of values are still stored. Additionally, I suspect that internal calculation use the usual rules for addition and multiplication, which are not needed. Please tell me if I am wrong. |
Registered Member
|
Ah, I see your optimization -- nixing the value matrix. Either way, booleans are only 1 extra bit. I suppose you should just look at the overhead of the sparse indecies+1 bit vs. a dense for your matrix size and sparsity factors.
As for negative logic, that just assumes 0 == true and 1 == false, so the current paradigm of anything not stored == 0 gives you the logic you want. |
Moderator
|
Yes I've already thought about adding such a feature. I'd probably go for extending the Options template parameter of SparseMatrix<>.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]