mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
bug fix in SparseSelfAdjointTimeDenseProduct for empty rows or columns
This commit is contained in:
parent
00d4a360ba
commit
6b8d6887ac
@ -556,24 +556,15 @@ class SparseMatrix
|
|||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||||
template<typename Lhs, typename Rhs>
|
template<typename Lhs, typename Rhs>
|
||||||
inline SparseMatrix& operator=(const SparseSparseProduct<Lhs,Rhs>& product)
|
inline SparseMatrix& operator=(const SparseSparseProduct<Lhs,Rhs>& product)
|
||||||
{
|
{ return Base::operator=(product); }
|
||||||
initAssignment(product);
|
|
||||||
return Base::operator=(product);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline SparseMatrix& operator=(const ReturnByValue<OtherDerived>& other)
|
inline SparseMatrix& operator=(const ReturnByValue<OtherDerived>& other)
|
||||||
{
|
{ return Base::operator=(other.derived()); }
|
||||||
initAssignment(other.derived());
|
|
||||||
return Base::operator=(other.derived());
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline SparseMatrix& operator=(const EigenBase<OtherDerived>& other)
|
inline SparseMatrix& operator=(const EigenBase<OtherDerived>& other)
|
||||||
{
|
{ return Base::operator=(other.derived()); }
|
||||||
initAssignment(other.derived());
|
|
||||||
return Base::operator=(other.derived());
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
|
@ -229,7 +229,7 @@ class SparseSelfAdjointTimeDenseProduct
|
|||||||
LhsInnerIterator i(m_lhs,j);
|
LhsInnerIterator i(m_lhs,j);
|
||||||
if (ProcessSecondHalf)
|
if (ProcessSecondHalf)
|
||||||
{
|
{
|
||||||
while (i.index()<j) ++i;
|
while (i && i.index()<j) ++i;
|
||||||
if(i && i.index()==j)
|
if(i && i.index()==j)
|
||||||
{
|
{
|
||||||
dest.row(j) += i.value() * m_rhs.row(j);
|
dest.row(j) += i.value() * m_rhs.row(j);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user