This commit is contained in:
Benoit Jacob
2010-01-07 21:53:52 -05:00
parent 7befc8d6f3
commit 58fb27cd56
7 changed files with 21 additions and 13 deletions

View File

@@ -105,10 +105,10 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence
{
if(m_trans)
dst.corner(BottomRight, length-k, length-k)
.applyHouseholderOnTheRight(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(0));
.applyHouseholderOnTheRight(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(0));
else
dst.corner(BottomRight, length-k, length-k)
.applyHouseholderOnTheLeft(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(k));
.applyHouseholderOnTheLeft(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(k));
}
}
@@ -121,7 +121,7 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence
for(int k = 0; k < vecs; ++k)
{
int actual_k = m_trans ? vecs-k-1 : k;
dst.corner(BottomRight, dst.rows(), length-actual_k)
dst.block(0, dst.cols()-length, dst.rows(), length-actual_k)
.applyHouseholderOnTheRight(m_vectors.col(actual_k).tail(length-actual_k-1), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
}
}
@@ -135,7 +135,7 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence
for(int k = 0; k < vecs; ++k)
{
int actual_k = m_trans ? k : vecs-k-1;
dst.corner(BottomRight, length-actual_k, dst.cols())
dst.block(dst.rows()-length, 0, length-actual_k, dst.cols())
.applyHouseholderOnTheLeft(m_vectors.col(actual_k).tail(length-actual_k-1), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
}
}