Gardar Johannesson
2007-Apr-24 17:23 UTC
[R] Matrix: how to re-use the symbolic Cholesky factorization?
I have been playing around with sparse matrices in the Matrix package, in particularly with the Cholesky factorization of matrices of class dsCMatrix. And BTW, what a fantastic package. My problem is that I have to carry out repeated Cholesky factorization of a spares symmetric matrices, say Q_1, Q_2, ...,Q_n, where the Q's have the same non-zero pattern. I know in this case one does only need to carry out the symbolic factorization _once_ and then follow that up with a numerical factorization for each of the Q_i's (re-using the general symbolic factorization each time). Does anybody know if this is possible using the Matrix package? Thanks, Gardar Johannesson Lawrence Livermore National Laboratory
Douglas Bates
2007-Apr-24 20:20 UTC
[R] Matrix: how to re-use the symbolic Cholesky factorization?
On 4/24/07, Gardar Johannesson <johannesson1 at llnl.gov> wrote:> I have been playing around with sparse matrices in the Matrix > package, in particularly with the Cholesky factorization of matrices > of class dsCMatrix. And BTW, what a fantastic package. > > My problem is that I have to carry out repeated Cholesky > factorization of a spares symmetric matrices, say Q_1, Q_2, ...,Q_n, > where the Q's have the same non-zero pattern. I know in this case one > does only need to carry out the symbolic factorization _once_ and > then follow that up with a numerical factorization for each of the > Q_i's (re-using the general symbolic factorization each time). Does > anybody know if this is possible using the Matrix package?At present that is not possible without writing your own C code that calls functions in the CHOLMOD library of C functions directly. We'll add that to the "ToDo" list. The easiest interface I can picture is to pass a Cholesky factorization object along with the dsCMatrix object that contains the new values with the old pattern.