Lines Matching refs:mat
427 void tridiagonalization_inplace(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool…
429 eigen_assert(mat.cols()==mat.rows() && diag.size()==mat.rows() && subdiag.size()==mat.rows()-1);
430 tridiagonalization_inplace_selector<MatrixType>::run(mat, diag, subdiag, extractQ);
442 static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)
444 CoeffVectorType hCoeffs(mat.cols()-1);
445 tridiagonalization_inplace(mat,hCoeffs);
446 diag = mat.diagonal().real();
447 subdiag = mat.template diagonal<-1>().real();
449 mat = HouseholderSequenceType(mat, hCoeffs.conjugate())
450 .setLength(mat.rows() - 1)
466 static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType& subdiag, bool extractQ)
470 diag[0] = mat(0,0);
471 RealScalar v1norm2 = numext::abs2(mat(2,0));
474 diag[1] = mat(1,1);
475 diag[2] = mat(2,2);
476 subdiag[0] = mat(1,0);
477 subdiag[1] = mat(2,1);
479 mat.setIdentity();
483 RealScalar beta = sqrt(numext::abs2(mat(1,0)) + v1norm2);
485 Scalar m01 = mat(1,0) * invBeta;
486 Scalar m02 = mat(2,0) * invBeta;
487 Scalar q = RealScalar(2)*m01*mat(2,1) + m02*(mat(2,2) - mat(1,1));
488 diag[1] = mat(1,1) + m02*q;
489 diag[2] = mat(2,2) - m02*q;
491 subdiag[1] = mat(2,1) - m01 * q;
494 mat << 1, 0, 0,
511 static void run(MatrixType& mat, DiagonalType& diag, SubDiagonalType&, bool extractQ)
513 diag(0,0) = numext::real(mat(0,0));
515 mat(0,0) = Scalar(1);
534 TridiagonalizationMatrixTReturnType(const MatrixType& mat) : m_matrix(mat) { }