I need to solve a large number of linear problems with the same matrix of size of a few hundred. The initialization cost is irrelevant, but the run-time cost is critical. Naively, my LA background tells me I should just invert my matrix and use the cached invert to solve each of my linear problems. However, the Eigen documentation mentions that this may not be the best approach.
So, here are my 2 questions:
What are the speed and accuracy differences between .solve() and just multiplying the inverted matrix by the RHS if the original matrix is well behaved?
Does the answer change if the original matrix is not well behaved but not completely degenerate (none of the eigenvalues is 0, but the ratio of the largest to the smallest is large)?
I am a newbie in Eigen, so I apologize if this is a repeating question, I did search the archive before posting.
Nick Gnedin