How to use custom preconditioner with Eigen
问题 I am trying to use a custom preconditioner for an iterative solver (CG for instance) with Eigen. Specifically, I have to solve a similar problem multiple times: the matrix changes slightly but stays close to a mean matrix. I would like to compute a Cholesky decomposition of my mean matrix and then use this as a preconditioner. What I had in mind is something like: ConjugateGradient< SparseMatrix<double>, Lower, CholmodSupernodalLLT<SparseMatrix<double>> > solver(meanMatrix); solver