diff options
Diffstat (limited to 'eigen/unsupported/Eigen/src/SparseExtra')
3 files changed, 23 insertions, 11 deletions
diff --git a/eigen/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h b/eigen/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h index 0e8350a..536a0c3 100644 --- a/eigen/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h +++ b/eigen/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h @@ -931,7 +931,7 @@ class BlockSparseMatrix : public SparseMatrixBase<BlockSparseMatrix<_Scalar,_Blo } /** - * \returns the starting position of the block <id> in the array of values + * \returns the starting position of the block \p id in the array of values */ Index blockPtr(Index id) const { diff --git a/eigen/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h b/eigen/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h index 037a13f..0ffbc43 100644 --- a/eigen/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h +++ b/eigen/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h @@ -228,6 +228,9 @@ template<typename _Scalar, int _Options, typename _StorageIndex> EIGEN_DEPRECATED inline DynamicSparseMatrix() : m_innerSize(0), m_data(0) { + #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + #endif eigen_assert(innerSize()==0 && outerSize()==0); } @@ -235,6 +238,9 @@ template<typename _Scalar, int _Options, typename _StorageIndex> EIGEN_DEPRECATED inline DynamicSparseMatrix(Index rows, Index cols) : m_innerSize(0) { + #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + #endif resize(rows, cols); } @@ -243,12 +249,18 @@ template<typename _Scalar, int _Options, typename _StorageIndex> EIGEN_DEPRECATED explicit inline DynamicSparseMatrix(const SparseMatrixBase<OtherDerived>& other) : m_innerSize(0) { - Base::operator=(other.derived()); + #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + #endif + Base::operator=(other.derived()); } inline DynamicSparseMatrix(const DynamicSparseMatrix& other) : Base(), m_innerSize(0) { + #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN + #endif *this = other.derived(); } diff --git a/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h b/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h index 41e4af4..04b7d69 100644 --- a/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h +++ b/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h @@ -17,8 +17,8 @@ namespace Eigen { namespace internal { - template <typename Scalar> - inline bool GetMarketLine (std::stringstream& line, Index& M, Index& N, Index& i, Index& j, Scalar& value) + template <typename Scalar,typename IndexType> + inline bool GetMarketLine (std::stringstream& line, IndexType& M, IndexType& N, IndexType& i, IndexType& j, Scalar& value) { line >> i >> j >> value; i--; @@ -30,8 +30,8 @@ namespace internal else return false; } - template <typename Scalar> - inline bool GetMarketLine (std::stringstream& line, Index& M, Index& N, Index& i, Index& j, std::complex<Scalar>& value) + template <typename Scalar,typename IndexType> + inline bool GetMarketLine (std::stringstream& line, IndexType& M, IndexType& N, IndexType& i, IndexType& j, std::complex<Scalar>& value) { Scalar valR, valI; line >> i >> j >> valR >> valI; @@ -134,7 +134,7 @@ template<typename SparseMatrixType> bool loadMarket(SparseMatrixType& mat, const std::string& filename) { typedef typename SparseMatrixType::Scalar Scalar; - typedef typename SparseMatrixType::Index Index; + typedef typename SparseMatrixType::StorageIndex StorageIndex; std::ifstream input(filename.c_str(),std::ios::in); if(!input) return false; @@ -144,11 +144,11 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename) bool readsizes = false; - typedef Triplet<Scalar,Index> T; + typedef Triplet<Scalar,StorageIndex> T; std::vector<T> elements; - Index M(-1), N(-1), NNZ(-1); - Index count = 0; + StorageIndex M(-1), N(-1), NNZ(-1); + StorageIndex count = 0; while(input.getline(buffer, maxBuffersize)) { // skip comments @@ -171,7 +171,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename) } else { - Index i(-1), j(-1); + StorageIndex i(-1), j(-1); Scalar value; if( internal::GetMarketLine(line, M, N, i, j, value) ) { |