mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +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>
|
template<typename OtherDerived>
|
||||||
inline SparseVector& operator=(const SparseMatrixBase<OtherDerived>& other)
|
inline SparseVector& operator=(const SparseMatrixBase<OtherDerived>& other)
|
||||||
{
|
{
|
||||||
|
if (int(RowsAtCompileTime)!=int(OtherDerived::RowsAtCompileTime))
|
||||||
|
return Base::operator=(other.transpose());
|
||||||
|
else
|
||||||
return Base::operator=(other);
|
return Base::operator=(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user