mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* split Product to a DiagonalProduct template specialization
to optimize matrix-diag and diag-matrix products without making Product over complicated. * compilation fixes in Tridiagonalization and HessenbergDecomposition in the case of 2x2 matrices. * added an Orientation2D small class with similar interface than Quaternion (used by Transform to handle 2D and 3D orientations seamlessly) * added a couple of features in Transform.
This commit is contained in:
@@ -239,7 +239,8 @@ HessenbergDecomposition<MatrixType>::matrixH(void) const
|
||||
// and fill it (to avoid temporaries)
|
||||
int n = m_matrix.rows();
|
||||
MatrixType matH = m_matrix;
|
||||
matH.corner(BottomLeft,n-2, n-2).template part<Lower>().setZero();
|
||||
if (n>2)
|
||||
matH.corner(BottomLeft,n-2, n-2).template part<Lower>().setZero();
|
||||
return matH;
|
||||
}
|
||||
|
||||
|
||||
@@ -160,8 +160,11 @@ Tridiagonalization<MatrixType>::matrixT(void) const
|
||||
int n = m_matrix.rows();
|
||||
MatrixType matT = m_matrix;
|
||||
matT.corner(TopRight,n-1, n-1).diagonal() = subDiagonal().conjugate();
|
||||
matT.corner(TopRight,n-2, n-2).template part<Upper>().setZero();
|
||||
matT.corner(BottomLeft,n-2, n-2).template part<Lower>().setZero();
|
||||
if (n>2)
|
||||
{
|
||||
matT.corner(TopRight,n-2, n-2).template part<Upper>().setZero();
|
||||
matT.corner(BottomLeft,n-2, n-2).template part<Lower>().setZero();
|
||||
}
|
||||
return matT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user