aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/CompressedStorage.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-02-17 18:52:39 +0100
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-02-17 18:52:39 +0100
commit97a36ecba446750620c47237e16106f245a422b9 (patch)
tree74bd84243fe8c14f965f0cb3bf0a6e4f656f831e /Eigen/src/SparseCore/CompressedStorage.h
parent159fb181c222afb3634006f0a620dd5b5419e924 (diff)
Suppress some remaining Index conversion warnings
Diffstat (limited to 'Eigen/src/SparseCore/CompressedStorage.h')
-rw-r--r--Eigen/src/SparseCore/CompressedStorage.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/Eigen/src/SparseCore/CompressedStorage.h b/Eigen/src/SparseCore/CompressedStorage.h
index 454462ad5..cae9c38b0 100644
--- a/Eigen/src/SparseCore/CompressedStorage.h
+++ b/Eigen/src/SparseCore/CompressedStorage.h
@@ -90,7 +90,6 @@ class CompressedStorage
m_size = size;
}
- // FIXME i should be a StorageIndex
void append(const Scalar& v, Index i)
{
Index id = m_size;
@@ -110,13 +109,13 @@ class CompressedStorage
inline const StorageIndex& index(Index i) const { return m_indices[i]; }
/** \returns the largest \c k such that for all \c j in [0,k) index[\c j]\<\a key */
- inline StorageIndex searchLowerIndex(StorageIndex key) const
+ inline Index searchLowerIndex(Index key) const
{
return searchLowerIndex(0, m_size, key);
}
/** \returns the largest \c k in [start,end) such that for all \c j in [start,k) index[\c j]\<\a key */
- inline Index searchLowerIndex(Index start, Index end, StorageIndex key) const
+ inline Index searchLowerIndex(Index start, Index end, Index key) const
{
while(end>start)
{
@@ -131,7 +130,7 @@ class CompressedStorage
/** \returns the stored value at index \a key
* If the value does not exist, then the value \a defaultValue is returned without any insertion. */
- inline Scalar at(StorageIndex key, const Scalar& defaultValue = Scalar(0)) const
+ inline Scalar at(Index key, const Scalar& defaultValue = Scalar(0)) const
{
if (m_size==0)
return defaultValue;
@@ -144,7 +143,7 @@ class CompressedStorage
}
/** Like at(), but the search is performed in the range [start,end) */
- inline Scalar atInRange(Index start, Index end, StorageIndex key, const Scalar &defaultValue = Scalar(0)) const
+ inline Scalar atInRange(Index start, Index end, Index key, const Scalar &defaultValue = Scalar(0)) const
{
if (start>=end)
return defaultValue;
@@ -159,7 +158,7 @@ class CompressedStorage
/** \returns a reference to the value at index \a key
* If the value does not exist, then the value \a defaultValue is inserted
* such that the keys are sorted. */
- inline Scalar& atWithInsertion(StorageIndex key, const Scalar& defaultValue = Scalar(0))
+ inline Scalar& atWithInsertion(Index key, const Scalar& defaultValue = Scalar(0))
{
Index id = searchLowerIndex(0,m_size,key);
if (id>=m_size || m_indices[id]!=key)
@@ -189,7 +188,7 @@ class CompressedStorage
internal::smart_memmove(m_indices+id, m_indices+m_size, m_indices+id+1);
}
m_size++;
- m_indices[id] = key;
+ m_indices[id] = internal::convert_index<StorageIndex>(key);
m_values[id] = defaultValue;
}
return m_values[id];