Lines Matching refs:Matrix
32 * \tparam _MatrixType the type of the matrix of which we are computing the
33 * eigendecomposition; this is expected to be an instantiation of the Matrix
36 * A matrix \f$ A \f$ is selfadjoint if it equals its adjoint. For real
37 * matrices, this means that the matrix is symmetric: it equals its
39 * selfadjoint matrix. These are the scalars \f$ \lambda \f$ and vectors
41 * selfadjoint matrix are always real. If \f$ D \f$ is a diagonal matrix with
42 * the eigenvalues on the diagonal, and \f$ V \f$ is a matrix with the
44 * matrices, the matrix \f$ V \f$ is always invertible). This is called the
47 * The algorithm exploits the fact that the matrix is selfadjoint, making it
51 * Only the \b lower \b triangular \b part of the input matrix is referenced.
54 * a given matrix. Alternatively, you can use the
106 * can only be used if \p _MatrixType is a fixed-size matrix; use
121 * \param [in] size Positive integer, size of the matrix whose
138 /** \brief Constructor; computes eigendecomposition of given matrix.
140 * \param[in] matrix Selfadjoint matrix whose eigendecomposition is to
141 * be computed. Only the lower triangular part of the matrix is referenced.
145 * eigenvalues of the matrix \p matrix. The eigenvectors are computed if
153 SelfAdjointEigenSolver(const MatrixType& matrix, int options = ComputeEigenvectors)
154 : m_eivec(matrix.rows(), matrix.cols()),
155 m_eivalues(matrix.cols()),
156 m_subdiag(matrix.rows() > 1 ? matrix.rows() - 1 : 1),
159 compute(matrix, options);
162 /** \brief Computes eigendecomposition of given matrix.
164 * \param[in] matrix Selfadjoint matrix whose eigendecomposition is to
165 * be computed. Only the lower triangular part of the matrix is referenced.
169 * This function computes the eigenvalues of \p matrix. The eigenvalues()
174 * This implementation uses a symmetric QR algorithm. The matrix is first
176 * tridiagonal matrix is then brought to diagonal form with implicit
178 * Section 8.3 of Golub \& Van Loan, <i>%Matrix Computations</i>.
185 * matrix does not change.
192 SelfAdjointEigenSolver& compute(const MatrixType& matrix, int options = ComputeEigenvectors);
194 /** \brief Computes eigendecomposition of given matrix using a direct algorithm
208 SelfAdjointEigenSolver& computeDirect(const MatrixType& matrix, int options = ComputeEigenvectors);
210 /** \brief Returns the eigenvectors of given matrix.
212 * \returns A const reference to the matrix whose columns are the eigenvectors.
216 * Column \f$ k \f$ of the returned matrix is an eigenvector corresponding
220 * matrix \f$ A \f$, then the matrix returned by this function is the
221 * matrix \f$ V \f$ in the eigendecomposition \f$ A = V D V^{-1} \f$.
235 /** \brief Returns the eigenvalues of given matrix.
242 * so there are as many eigenvalues as rows in the matrix. The eigenvalues
256 /** \brief Computes the positive-definite square root of the matrix.
258 * \returns the positive-definite square root of the matrix
260 * \pre The eigenvalues and eigenvectors of a positive-definite matrix
263 * The square root of a positive-definite matrix \f$ A \f$ is the
264 * positive-definite matrix whose square equals \f$ A \f$. This function
281 /** \brief Computes the inverse square root of the matrix.
283 * \returns the inverse positive-definite square root of the matrix
285 * \pre The eigenvalues and eigenvectors of a positive-definite matrix
319 * denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).
324 SelfAdjointEigenSolver(const MatrixType& matrix, bool computeEigenvectors)
325 : m_eivec(matrix.rows(), matrix.cols()),
326 m_eivalues(matrix.cols()),
327 m_subdiag(matrix.rows() > 1 ? matrix.rows() - 1 : 1),
330 compute(matrix, computeEigenvectors);
342 void compute(const MatrixType& matrix, bool computeEigenvectors)
344 compute(matrix, computeEigenvectors ? ComputeEigenvectors : EigenvaluesOnly);
366 * Performs a QR step on a tridiagonal symmetric matrix represented as a
369 * \param matA the input selfadjoint matrix
375 * Implemented from Golub's "Matrix Computations", algorithm 8.3.2:
385 ::compute(const MatrixType& matrix, int options)
387 eigen_assert(matrix.cols() == matrix.rows());
392 Index n = matrix.cols();
397 m_eivalues.coeffRef(0,0) = internal::real(matrix.coeff(0,0));
410 // map the matrix coefficients to [-1:1] to avoid over- and underflow.
411 RealScalar scale = matrix.cwiseAbs().maxCoeff();
413 mat = matrix / scale;
503 // real-valued, because the matrix is symmetric.
553 // map the matrix coefficients to [-1:1] to avoid over- and underflow.
601 // the input matrix and/or the eigenvaues probably contains some inf/NaN,
687 // map the matrix coefficients to [-1:1] to avoid over- and underflow.
729 ::computeDirect(const MatrixType& matrix, int options)
731 internal::direct_selfadjoint_eigenvalues<SelfAdjointEigenSolver,Size,NumTraits<Scalar>::IsComplex>::run(*this,matrix,options);
775 // apply the givens rotation to the unit matrix Q = Q * G
779 Map<Matrix<Scalar,Dynamic,Dynamic,StorageOrder> > q(matrixQ,n,n);