mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
add auto transposition for vectors
This commit is contained in:
parent
7029ed6b88
commit
facee57b8d
@ -239,6 +239,9 @@ class SparseVector
|
||||
template<typename OtherDerived>
|
||||
inline SparseVector& operator=(const SparseMatrixBase<OtherDerived>& other)
|
||||
{
|
||||
if (int(RowsAtCompileTime)!=int(OtherDerived::RowsAtCompileTime))
|
||||
return Base::operator=(other.transpose());
|
||||
else
|
||||
return Base::operator=(other);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user