Updating a row in sparse cholesky factorisation using CHOLMOD

CHOLMOD allows the modification of a row of a sparse matrix and updates the factorisation, accordingly. There is a function ldlrowmod in Matlab that interfaces to rowadd and rowdel from CHOLMOD (SuiteSparse/CHOLMOD/MATLAB/ldlrowmod.m at dev · DrTimothyAldenDavis/SuiteSparse · GitHub)

Currently, SparseArray.CHOLMOD only offers an interface to SparseArrays.CHOLMOD.lowrankupdowndate for updates to the factorization. But this only allows updates to A of the form A + CC’ which is very limited.

A use case of updates of a row is in active set methods, where the active set is updated one item at a time. We then need to update a row (and column) of the Cholesky factorisation of the reduced Hessian. I am sure there are many other use cases where a cholesky factorisation is update one row at a time.

In Matlab and example of code would be

n= 20
H = speye(n)
LD = ldlchol(H)
LD3 = ldlrowmod (LD, 10,sparse(rand(n,1)))
[L,D] = ldlsplit(LD3)
figure; spy(L)
figure; spy(abs(L*D*L')>0.01)

Is a similar thing possible currently in Julia? I was not able to do this. Any advice?

I would be happy to contribute.

1 Like

I am able to access the desired functions using ccall using this example. I still have to test in the real application. But it works for this example.
test_add_delete_row.jl (1.5 KB)

1 Like