mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Add missing epxlicit keyword, and fix regression in DynamicSparseMatrix
This commit is contained in:
parent
63e29e7765
commit
6407e367ee
@ -120,12 +120,18 @@ class SparseCompressedBase<Derived>::InnerIterator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InnerIterator(const SparseCompressedBase& mat)
|
explicit InnerIterator(const SparseCompressedBase& mat)
|
||||||
: m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZeros())
|
: m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_id(0), m_end(mat.nonZeros())
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
explicit InnerIterator(const internal::CompressedStorage<Scalar,StorageIndex>& data)
|
||||||
|
: m_values(&data.value(0)), m_indices(&data.index(0)), m_outer(0), m_id(0), m_end(data.size())
|
||||||
|
{
|
||||||
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
|
||||||
|
}
|
||||||
|
|
||||||
inline InnerIterator& operator++() { m_id++; return *this; }
|
inline InnerIterator& operator++() { m_id++; return *this; }
|
||||||
|
|
||||||
inline const Scalar& value() const { return m_values[m_id]; }
|
inline const Scalar& value() const { return m_values[m_id]; }
|
||||||
@ -173,9 +179,17 @@ class SparseCompressedBase<Derived>::ReverseInnerIterator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReverseInnerIterator(const SparseCompressedBase& mat)
|
explicit ReverseInnerIterator(const SparseCompressedBase& mat)
|
||||||
: m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_start(0), m_id(mat.nonZeros())
|
: m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(0), m_start(0), m_id(mat.nonZeros())
|
||||||
{}
|
{
|
||||||
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
|
||||||
|
}
|
||||||
|
|
||||||
|
explicit ReverseInnerIterator(const internal::CompressedStorage<Scalar,StorageIndex>& data)
|
||||||
|
: m_values(&data.value(0)), m_indices(&data.index(0)), m_outer(0), m_start(0), m_id(data.size())
|
||||||
|
{
|
||||||
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived);
|
||||||
|
}
|
||||||
|
|
||||||
inline ReverseInnerIterator& operator--() { --m_id; return *this; }
|
inline ReverseInnerIterator& operator--() { --m_id; return *this; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user