diff --git a/src/adapters/GmmxxAdapter.h b/src/adapters/GmmxxAdapter.h index c696e15e4..ff35800b2 100644 --- a/src/adapters/GmmxxAdapter.h +++ b/src/adapters/GmmxxAdapter.h @@ -62,46 +62,6 @@ public: return result; } - - /*! - * Converts a sparse matrix into a sparse matrix in the gmm++ format. - * @return A pointer to a row-major sparse matrix in gmm++ format. - */ - template - static std::unique_ptr> toGmmxxSparseMatrix(storm::storage::SparseMatrix&& matrix) { - uint_fast64_t realNonZeros = matrix.getEntryCount(); - LOG4CPLUS_DEBUG(logger, "Converting matrix with " << realNonZeros << " non-zeros to gmm++ format."); - - // Prepare the resulting matrix. - std::unique_ptr> result(new gmm::csr_matrix(matrix.getRowCount(), matrix.getColumnCount())); - - typedef unsigned long long IND_TYPE; - typedef std::vector vectorType_ull_t; - typedef std::vector vectorType_T_t; - - // Copy columns and values. It is absolutely necessary to do so before moving the row indications vector. - std::vector values; - values.reserve(matrix.getEntryCount()); - - // To match the correct vector type for gmm, we create the vector with the exact same type. - decltype(result->ir) columns; - columns.reserve(matrix.getEntryCount()); - - for (auto const& entry : matrix) { - columns.emplace_back(entry.first); - values.emplace_back(entry.second); - } - - // Move Row Indications - result->jc = std::move(matrix.rowIndications); - - std::swap(result->ir, columns); - std::swap(result->pr, values); - - LOG4CPLUS_DEBUG(logger, "Done converting matrix to gmm++ format."); - - return result; - } }; } //namespace adapters