[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
I was also in doubt about that use of "mutable". The idea was that the computing of QR later than by the constructor is a const "action". For example, if one writes a function like this:
template<typename MatrixType> void my_funct (const GivensQR<MatrixType>& qr);
in which he uses a const version of a QR decomposition, then the function should maybe compute the decomposition. Besides, the matrixQ() and matrixR() methods should be const from the user's point of view, but these methods call the compute_xy(), so compute_xy() should also be const. This implies that all the properties should be mutable.
On the other hand, if we decide that the stored matrices are not mutable, then the methods cannot be const...