Hi all. I read the documentation here Linear Algebra · The Julia Language for what is returned when you call cholesky on a SparseMatrixCSC object but I still can’t figure out how to get back the upper triangular factor of the (non permuted) matrix. The docs say to use LtP = F.UP but whatever is returned by the field UP is not being converted into what I want by calling sparse or Matrix on it. Can someone help me figure out how to do this? MWE below:
It’s poorly documented, but C.L is the only factor that supports being directly converted to a (sparse) matrix, so you need to do the permutation and transposition yourself, as @technocrat showed. However, you don’t need to permute the second dimension of L— it’s contracted over anyway, so its order is irrelevant as long as it’s consistent between the two factors. Thus, what you want is PtL = sparse(C.L)[invperm(p), :], and, if desired, UP = PtL'.