mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix sparse iterator and tests.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
70410310a4
commit
3918768be1
@@ -360,6 +360,7 @@ public:
|
||||
|
||||
StorageVal(const StorageIndex& innerIndex, const Scalar& value) : m_innerIndex(innerIndex), m_value(value) {}
|
||||
StorageVal(const StorageVal& other) : m_innerIndex(other.m_innerIndex), m_value(other.m_value) {}
|
||||
StorageVal(StorageVal&& other) = default;
|
||||
|
||||
inline const StorageIndex& key() const { return m_innerIndex; }
|
||||
inline StorageIndex& key() { return m_innerIndex; }
|
||||
@@ -382,6 +383,9 @@ class StorageRef
|
||||
{
|
||||
public:
|
||||
using value_type = StorageVal<Scalar, StorageIndex>;
|
||||
|
||||
// StorageRef Needs to be move-able for sort on macos.
|
||||
StorageRef(StorageRef&& other) = default;
|
||||
|
||||
inline StorageRef& operator=(const StorageRef& other) {
|
||||
key() = other.key();
|
||||
@@ -436,6 +440,7 @@ public:
|
||||
CompressedStorageIterator(difference_type index, StorageIndex* innerIndexPtr, Scalar* valuePtr) : m_index(index), m_data(innerIndexPtr, valuePtr) {}
|
||||
CompressedStorageIterator(difference_type index, reference data) : m_index(index), m_data(data) {}
|
||||
CompressedStorageIterator(const CompressedStorageIterator& other) : m_index(other.m_index), m_data(other.m_data) {}
|
||||
CompressedStorageIterator(CompressedStorageIterator&& other) = default;
|
||||
inline CompressedStorageIterator& operator=(const CompressedStorageIterator& other) {
|
||||
m_index = other.m_index;
|
||||
m_data = other.m_data;
|
||||
|
||||
Reference in New Issue
Block a user