[eigen] HessenbergDecomposition::householderCoefficients()

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hello,

I have some questions about the function householderCoefficients() in HessenbergDecomposition, which returns the vector of coefficients for the Householder reflections which reduce the given matrix to Hessenberg form.

Why does it return a vector of length N-1 (where N is the size of the matrix whose Hessenberg decomposition is being computed)? I think that you need only N-2 Householder reflections to reduce a matrix to Hessenberg form. The last two columns of the matrix are already in the correct form, so only N-2 columns need to be transformed. See also for instance Algorithm 7.4.2 in Golub & Van Loan. This should perhaps also be taken into account when computing the Hessenberg decomposition.

While I was thinking about this, I started to wonder whether we should store the coefficients at all. For real matrices, the coefficients are given by 2 / |v|^2 where v is the Householder vector so it is not necessary to store them. On the other hand, we do save some effort if we do not recompute the coefficients - though probably not very much - and the memory requirements for storing the coefficients is only O(N). In the complex case, the coefficients are not uniquely determined by the vectors IIRC, and it makes sense to use the same algorithm for both real and complex scalars if possible. So there seems to be a good argument for sticking to the current strategy of storing the coefficients.

The EigenSolver class uses its own routine for reducing the matrix to Hessenberg form. I assume that this is simply because nobody has had time to rewrite it to use HessenbergDecomposition.

Cheers,
Jitse



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/