I want to reuse a sparse matrix structure and a solver for faster linear solve:
Eigen::SparseMatrix<double, Eigen::ColMajor> A;
Eigen::SparseLU<Eigen::SparseMatrix<double, Eigen::ColMajor>, Eigen::COLAMDOrdering<Eigen::Index> > solver;
I set A at the beginning with 0 entries and ask the solver to analyze the pattern.
Now,, I'd like to reuse the matrix instead of creating a new one, as I'm doing real-time computations and don't want any allocation there.
Can I use the comma operator? Or is there another operator that I can use to update the matrix existing entries? I tried to find information online but couldn't find the best practice for this..