mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Sparse move
This commit is contained in:
committed by
Antonio Sánchez
parent
c8d368bdaf
commit
7b5d32b7c9
@@ -304,6 +304,24 @@ class SparseVector : public SparseCompressedBase<SparseVector<Scalar_, Options_,
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline SparseVector(SparseVector&& other) : SparseVector() { this->swap(other); }
|
||||
|
||||
template <typename OtherDerived>
|
||||
inline SparseVector(SparseCompressedBase<OtherDerived>&& other) : SparseVector() {
|
||||
*this = other.derived().markAsRValue();
|
||||
}
|
||||
|
||||
inline SparseVector& operator=(SparseVector&& other) {
|
||||
this->swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename OtherDerived>
|
||||
inline SparseVector& operator=(SparseCompressedBase<OtherDerived>&& other) {
|
||||
*this = other.derived().markAsRValue();
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||
template <typename Lhs, typename Rhs>
|
||||
inline SparseVector& operator=(const SparseSparseProduct<Lhs, Rhs>& product) {
|
||||
|
||||
Reference in New Issue
Block a user