* 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:
Gael Guennebaud
2008-06-15 11:54:18 +00:00
parent fbbd8afe30
commit 0ee6b08128
9 changed files with 374 additions and 51 deletions

View File

@@ -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;
}

View File

@@ -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;
}