Patch by Kolja Brix <brix@igpm.rwth-aachen.de> that fixes bug #565 and adds a testcase to verify that.

This commit is contained in:
Christoph Hertzberg
2013-03-17 13:55:31 +01:00
parent f8addac4e1
commit 6357fd68da
2 changed files with 13 additions and 4 deletions

View File

@@ -48,8 +48,8 @@ class KroneckerProduct : public ReturnByValue<KroneckerProduct<Lhs,Rhs> >
Scalar coeff(Index row, Index col) const
{
return m_A.coeff(row / m_A.cols(), col / m_A.rows()) *
m_B.coeff(row % m_A.cols(), col % m_A.rows());
return m_A.coeff(row / m_B.rows(), col / m_B.cols()) *
m_B.coeff(row % m_B.rows(), col % m_B.cols());
}
Scalar coeff(Index i) const