I have a CHOLMOD factorization of a sparse matrix H
, and I want to edit the sparse representation of the upper, lower, and block diagonal factors. How can I do this? When I run the below, the last line doesn't work.
H = sprand(10,10,0.5)
fac = ldltfact(H; shift=0.0)
fD = fac[:D]
D = Base.SparseArrays.CHOLMOD.Sparse(fD)
And is there any way to go in the reverse direction from a sparse matrix to a CHOLMOD.factor
?
Extracting the relevant factorization matrices of
ldltfact
can be a little tedious. The following example shows an example similar to the one in the question with a final test that the extracted matrices recover the original factorized one:The expected output (and actual on Julia v0.6.3):
Hope this helps.