mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1105: fix default preallocation when moving from compressed to uncompressed mode
This commit is contained in:
@@ -1221,7 +1221,7 @@ typename SparseMatrix<_Scalar,_Options,_Index>::Scalar& SparseMatrix<_Scalar,_Op
|
||||
{
|
||||
// make sure the matrix is compatible to random un-compressed insertion:
|
||||
m_data.resize(m_data.allocatedSize());
|
||||
this->reserveInnerVectors(Array<StorageIndex,Dynamic,1>::Constant(2*m_outerSize, convert_index(m_outerSize)));
|
||||
this->reserveInnerVectors(Array<StorageIndex,Dynamic,1>::Constant(m_outerSize, 2));
|
||||
}
|
||||
|
||||
return insertUncompressed(row,col);
|
||||
|
||||
Reference in New Issue
Block a user