mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Return matrices by constant reference where possible.
This changes the return type of: * eigenvectors() and eigenvalues() in ComplexEigenSolver * eigenvalues() in EigenSolver * eigenvectors() and eigenvalues() in SelfAdjointEigenSolver
This commit is contained in:
@@ -223,7 +223,7 @@ template<typename _MatrixType> class EigenSolver
|
||||
|
||||
/** \brief Returns the eigenvalues of given matrix.
|
||||
*
|
||||
* \returns Column vector containing the eigenvalues.
|
||||
* \returns A const reference to the column vector containing the eigenvalues.
|
||||
*
|
||||
* \pre Either the constructor EigenSolver(const MatrixType&) or the
|
||||
* member function compute(const MatrixType&) has been called before.
|
||||
@@ -237,7 +237,7 @@ template<typename _MatrixType> class EigenSolver
|
||||
* \sa eigenvectors(), pseudoEigenvalueMatrix(),
|
||||
* MatrixBase::eigenvalues()
|
||||
*/
|
||||
EigenvalueType eigenvalues() const
|
||||
const EigenvalueType& eigenvalues() const
|
||||
{
|
||||
ei_assert(m_isInitialized && "EigenSolver is not initialized.");
|
||||
return m_eivalues;
|
||||
|
||||
Reference in New Issue
Block a user