title: Do iterative solvers in Eigen allocate memory every iteration?
body: <p>I am interested in using Eigen to solve sparse matrix equations.  Iterative solvers require a number of "scratch" vectors that are updated with intermediate values during each iteration.  As I understand it, when using an iterative solver such as the conjugate gradient method these vectors are usually allocated once before beginning iteration and then reused at every iteration to avoid frequent reallocations.  As far as I can tell from looking at the ConjugateGradient class, Eigen re-allocates memory at every iteration.  Could someone who is familiar with Eigen tell me whether my understanding is correct?  It seemed possible that there was some sort of clever memory-saving scheme going on in the allocation procedure, with the result that the memory is not actually reallocated each time through, but I dug down and could not find such a thing.  Alternatively, if Eigen is indeed re-allocating memory at each pass through the loop, is it an insubstantial burden compared to time required to do the actual computations?</p>