I am working with square matrices with a special form, which for large rank ($> 100,000$) would be best stored and manipulated as a SparseArray
. I believe that the Cholesky decomposition of these matrices itself could also be sparse. The question I have is
How do I compute the sparse Cholesky decomposition of a sparse matrix without resorting to dense storage of the intermediates and result?
For purposes of illustration:
n = 5;
s = SparseArray[{{i_, i_} -> 2., {i_, j_} /; Abs[i - j] == 1-> -1.}, {n, n}];
s // MatrixForm
The CholeskyDecomposition
function returns a dense matrix:
CholeskyDecomposition[s] // MatrixForm
The CholeskyDecomposition
documentation gives a lead: "Using LinearSolve
will give a LinearSolveFunction
that has a sparse Cholesky factorization".
ls = LinearSolve[s,"Method" -> "Cholesky"];
ls // InputForm
However, I'm stuck with what to do with this object to bring it in for the win.
ls["Properties"]
, then you can achieve many useful results. $\endgroup$