diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-10 23:08:10 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-10 23:08:10 +0100 |
commit | f60e6f5ee8314b563c2c3053255011b64f8d6635 (patch) | |
tree | 92c4fb16a71c3405e1f60f512436e3bbdfe0088a | |
parent | 594fd2d11d49fc3d84065de911ea25e88cb90d1c (diff) |
s/compressed()/isCompressed()
-rw-r--r-- | Eigen/src/CholmodSupport/CholmodSupport.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseBlock.h | 4 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 24 |
3 files changed, 16 insertions, 16 deletions
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index 38f2ae3d5..c3c500faa 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -73,7 +73,7 @@ cholmod_sparse viewAsCholmod(SparseMatrix<_Scalar,_Options,_Index>& mat) res.i = mat.innerIndexPtr(); res.x = mat.valuePtr(); res.sorted = 1; - if(mat.compressed()) + if(mat.isCompressed()) { res.packed = 1; } @@ -170,7 +170,7 @@ enum CholmodMode { * \tparam _UpLo the triangular part that will be used for the computations. It can be Lower * or Upper. Default is Lower. * - * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or uncompressed. + * This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; isCompressed() or unisCompressed(). * * \sa \ref TutorialSparseDirectSolvers */ diff --git a/Eigen/src/SparseCore/SparseBlock.h b/Eigen/src/SparseCore/SparseBlock.h index 34c98926b..a6cde9df3 100644 --- a/Eigen/src/SparseCore/SparseBlock.h +++ b/Eigen/src/SparseCore/SparseBlock.h @@ -237,7 +237,7 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size> Index nonZeros() const { - if(m_matrix.compressed()) + if(m_matrix.isCompressed()) return std::size_t(m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()]) - std::size_t(m_matrix.outerIndexPtr()[m_outerStart]); else if(m_outerSize.value()==0) @@ -250,7 +250,7 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size> { EIGEN_STATIC_ASSERT_VECTOR_ONLY(SparseInnerVectorSet); eigen_assert(nonZeros()>0); - if(m_matrix.compressed()) + if(m_matrix.isCompressed()) return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart+1]-1]; else return m_matrix.valuePtr()[m_matrix.outerIndexPtr()[m_outerStart]+m_matrix.innerNonZeroPtr()[m_outerStart]-1]; diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index b393b3a22..24ecce8bc 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -126,7 +126,7 @@ class SparseMatrix public: /** \returns whether \c *this is in compressed form. */ - inline bool compressed() const { return m_innerNonZeros==0; } + inline bool isCompressed() const { return m_innerNonZeros==0; } /** \returns the number of rows of the matrix */ inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; } @@ -228,7 +228,7 @@ class SparseMatrix */ EIGEN_DONT_INLINE Scalar& insert(Index row, Index col) { - if(compressed()) + if(isCompressed()) { reserve(VectorXi::Constant(outerSize(), 2)); } @@ -262,14 +262,14 @@ class SparseMatrix * Precondition: the matrix must be in compressed mode. */ inline void reserve(Index reserveSize) { - eigen_assert(compressed() && "This function does not make sense in non compressed mode."); + eigen_assert(isCompressed() && "This function does not make sense in non compressed mode."); m_data.reserve(reserveSize); } #ifdef EIGEN_PARSED_BY_DOXYGEN /** Preallocates \a reserveSize[\c j] non zeros for each column (resp. row) \c j. * - * This function turns the matrix in non-compressed() mode */ + * This function turns the matrix in non-compressed mode */ template<class SizesType> inline void reserve(const SizesType& reserveSizes); #else @@ -291,7 +291,7 @@ class SparseMatrix inline void reserveInnerVectors(const SizesType& reserveSizes) { - if(compressed()) + if(isCompressed()) { std::size_t totalReserveSize = 0; // turn the matrix into non-compressed mode @@ -413,7 +413,7 @@ class SparseMatrix */ inline void finalize() { - if(compressed()) + if(isCompressed()) { Index size = static_cast<Index>(m_data.size()); Index i = m_outerSize; @@ -444,7 +444,7 @@ class SparseMatrix */ void makeCompressed() { - if(compressed()) + if(isCompressed()) return; Index oldStart = m_outerIndex[1]; @@ -593,7 +593,7 @@ class SparseMatrix else { initAssignment(other); - if(other.compressed()) + if(other.isCompressed()) { memcpy(m_outerIndex, other.m_outerIndex, (m_outerSize+1)*sizeof(Index)); m_data = other.m_data; @@ -729,7 +729,7 @@ protected: * \sa insert(Index,Index) */ EIGEN_DONT_INLINE Scalar& insertCompressed(Index row, Index col) { - eigen_assert(compressed()); + eigen_assert(isCompressed()); const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; @@ -852,7 +852,7 @@ protected: * \sa insert(Index,Index) */ EIGEN_DONT_INLINE Scalar& insertUncompressed(Index row, Index col) { - eigen_assert(!compressed()); + eigen_assert(!isCompressed()); const Index outer = IsRowMajor ? row : col; const Index inner = IsRowMajor ? col : row; @@ -904,7 +904,7 @@ class SparseMatrix<Scalar,_Options,_Index>::InnerIterator InnerIterator(const SparseMatrix& mat, Index outer) : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer), m_id(mat.m_outerIndex[outer]) { - if(mat.compressed()) + if(mat.isCompressed()) m_end = mat.m_outerIndex[outer+1]; else m_end = m_id + mat.m_innerNonZeros[outer]; @@ -937,7 +937,7 @@ class SparseMatrix<Scalar,_Options,_Index>::ReverseInnerIterator ReverseInnerIterator(const SparseMatrix& mat, Index outer) : m_values(mat.valuePtr()), m_indices(mat.innerIndexPtr()), m_outer(outer), m_start(mat.m_outerIndex[outer]) { - if(mat.compressed()) + if(mat.isCompressed()) m_id = mat.m_outerIndex[outer+1]; else m_id = m_start + mat.m_innerNonZeros[outer]; |