-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symmetric cannot be vectorized #151
Comments
It's not clear to me what My feeling is that you are better off writing your own inner product ( On the other hand, |
There's no issue with The same is not true for arbitrary types of redundancy. I suppose you could implement If |
No, there is a constant memory cost per column regardless of the number of nonzeros in it when you use compressed sparse column format. A tall skinny SparseMatrixCSC will use less memory than its transpose - until we add SparseMatrixCSR as a separate type, in which case the transposed matrix represented in the transposed format will use the same amount of memory as the original. |
If |
Perhaps the implementation of "vec" is a naive idea - it was prompted by the fact that I didn't know how to compute inner products in Julia with symmetric matrices. As I commented in the bottom of my post, many standard operations seem unsupported for symmetric matrices. Converting it to a full matrix, or storing the symmetric matrix as a full matrix (as BLAS/LAPACK does) seems fine, but if you have to do a manual conversion to a full matrix in order to do standard computations, then the usefulness of a symmetric matrix type is probably reduced. |
Having See #136 and JuliaLang/julia#8240 etc - most special matrix types are incompletely supported at the moment, I don't think we've determined the right abstractions yet to make all generic operations truly generic in a way that extends and composes automatically over matrix structure. Right now when there are missing methods for a type we have to write more code, that's all. So the burden of making a new type of matrix completely supported by all operations is pretty high right now. |
It depends on what you want to define If you mainly want a dot product, the right thing may be to overload |
To clarify, a As @tkelman wrote, the question in #136 is how to support all this functionality without a combinatorial explosion of methods that have to be written and maintained. The thought I had in JuliaLang/julia#8240 is perhaps we can get away with factoring out symmetry labels and storage formats as orthogonal concerns. The storage format clearly determines how one should traverse the matrix elements and the symmetry label dictates what to do with the intermediate results. |
I am closing this issue. After your explanations I realize it should not have been opened in the first place. I like the idea about a lightweight labeling of the LAPACK matrix formats. |
It should be possible to convert symmetric matrices into to vector form.
Otherwise it's not clear how to compute inner products with symmetric matrices, without manually converting to full matrices.
Other related examples that raise errors include:
The text was updated successfully, but these errors were encountered: