in all decs, make the compute() methods return *this

(implements feature request #18)
This commit is contained in:
Benoit Jacob
2009-08-15 23:12:39 -04:00
parent 65fe5f76fd
commit ee982709d3
9 changed files with 40 additions and 23 deletions

View File

@@ -118,7 +118,7 @@ template<typename _MatrixType> class EigenSolver
return m_eivalues;
}
void compute(const MatrixType& matrix);
EigenSolver& compute(const MatrixType& matrix);
private:
@@ -189,7 +189,7 @@ typename EigenSolver<MatrixType>::EigenvectorType EigenSolver<MatrixType>::eigen
}
template<typename MatrixType>
void EigenSolver<MatrixType>::compute(const MatrixType& matrix)
EigenSolver<MatrixType>& EigenSolver<MatrixType>::compute(const MatrixType& matrix)
{
assert(matrix.cols() == matrix.rows());
int n = matrix.cols();
@@ -205,6 +205,7 @@ void EigenSolver<MatrixType>::compute(const MatrixType& matrix)
hqr2(matH);
m_isInitialized = true;
return *this;
}
// Nonsymmetric reduction to Hessenberg form.