mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make all compute() methods return a reference to *this.
This commit is contained in:
@@ -141,6 +141,7 @@ template<typename _MatrixType> class HessenbergDecomposition
|
||||
/** \brief Computes Hessenberg decomposition of given matrix.
|
||||
*
|
||||
* \param[in] matrix Square matrix whose Hessenberg decomposition is to be computed.
|
||||
* \returns Reference to \c *this
|
||||
*
|
||||
* The Hessenberg decomposition is computed by bringing the columns of the
|
||||
* matrix successively in the required form using Householder reflections
|
||||
@@ -154,17 +155,18 @@ template<typename _MatrixType> class HessenbergDecomposition
|
||||
* Example: \include HessenbergDecomposition_compute.cpp
|
||||
* Output: \verbinclude HessenbergDecomposition_compute.out
|
||||
*/
|
||||
void compute(const MatrixType& matrix)
|
||||
HessenbergDecomposition& compute(const MatrixType& matrix)
|
||||
{
|
||||
m_matrix = matrix;
|
||||
if(matrix.rows()<2)
|
||||
{
|
||||
m_isInitialized = true;
|
||||
return;
|
||||
return *this;
|
||||
}
|
||||
m_hCoeffs.resize(matrix.rows()-1,1);
|
||||
_compute(m_matrix, m_hCoeffs, m_temp);
|
||||
m_isInitialized = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** \brief Returns the Householder coefficients.
|
||||
|
||||
Reference in New Issue
Block a user