Skip to content
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

Dense and sparse cholfact handles deviations from symmetry differently #189

Closed
andreasnoack opened this issue Mar 15, 2015 · 4 comments · Fixed by JuliaLang/julia#16799
Closed
Assignees
Labels
sparse Sparse arrays

Comments

@andreasnoack
Copy link
Member

andreasnoack commented Mar 15, 2015

Right now sparse Cholesky factorization checks for symmetry in contrast to dense Cholesky.

julia> A = speye(4);A[1,2] = eps();

julia> cholfact(A)
ERROR: ArgumentError: sparse matrix is not symmetric/Hermitian
 in cholfact at sparse/cholmod.jl:980
 in cholfact at sparse/cholmod.jl:1055

julia> cholfact(full(A))
Base.LinAlg.Cholesky{Float64,Array{Float64,2},:U} with factor:
4x4 Base.LinAlg.UpperTriangular{Float64,Array{Float64,2}}:
 1.0  2.22045e-16  0.0  0.0
 0.0  1.0          0.0  0.0
 0.0  0.0          1.0  0.0
 0.0  0.0          0.0  1.0

It is an easy fix to make this consistent, but which solution is preferred. Right now I lean towards the sparse solution where the matrix is checked for symmetry. If the user wants to bypass the check, there should be cholfact(Symmetric) method defined which is already the case for cholfact(Sparse).

@andreasnoack andreasnoack changed the title Dense and sparse cholfact handles diviations from symmetry differently Dense and sparse cholfact handles deviations from symmetry differently Mar 15, 2015
@tkelman
Copy link

tkelman commented Apr 21, 2016

Did this get changed with any of the recent cholmod refactorings, or is there still work to do here?

@andreasnoack
Copy link
Member Author

There is still work to do here.

@tkelman
Copy link

tkelman commented Apr 21, 2016

Will any of it happen before 0.5 or should this be pushed to a later milestone?

@andreasnoack andreasnoack self-assigned this Apr 21, 2016
@andreasnoack
Copy link
Member Author

andreasnoack commented Apr 21, 2016

It's a relatively small fix but can break some code so let me fix it in this cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sparse Sparse arrays
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants