diff --git a/unsupported/Eigen/src/SparseExtra/MarketIO.h b/unsupported/Eigen/src/SparseExtra/MarketIO.h index e05f638d6..8df25566e 100644 --- a/unsupported/Eigen/src/SparseExtra/MarketIO.h +++ b/unsupported/Eigen/src/SparseExtra/MarketIO.h @@ -147,7 +147,7 @@ inline bool getMarketHeader(const std::string& filename, int& sym, bool& iscompl * @tparam SparseMatrixType to read into, symmetries are not supported * @param mat SparseMatrix to read into, current values are overwritten * @param filename to parse matrix from - * @return returns true if file exists. Returns false if the parsing did not suceed. + * @return returns true if file exists. Returns false if the parsing did not succeed. */ template bool loadMarket(SparseMatrixType& mat, const std::string& filename) @@ -227,7 +227,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename) * @tparam DenseMatrixType to read into * @param mat DenseMatrix to read into, current values are overwritten, symmetries are not supported * @param filename to parse matrix from - * @return true if parsing was successful. Returns false if the parsing did not suceed. + * @return true if parsing was successful. Returns false if the parsing did not succeed. */ template bool loadMarketDense(DenseType& mat, const std::string& filename) @@ -303,7 +303,7 @@ bool loadMarketVector(VectorType& vec, const std::string& filename) * @param mat matrix to write to file * @param filename filename to write to * @param sym at the moment no symmetry operations are supported - * @return true if writing suceeded + * @return true if writing succeeded */ template bool saveMarket(const SparseMatrixType& mat, const std::string& filename, int sym = 0) @@ -339,7 +339,7 @@ bool saveMarket(const SparseMatrixType& mat, const std::string& filename, int sy * @tparam DenseMatrixType to write to file * @param mat matrix to write to file * @param filename filename to write to - * @return true if writing suceeded + * @return true if writing succeeded */ template diff --git a/unsupported/test/sparse_extra.cpp b/unsupported/test/sparse_extra.cpp index 70a9abe08..744545be6 100644 --- a/unsupported/test/sparse_extra.cpp +++ b/unsupported/test/sparse_extra.cpp @@ -7,24 +7,6 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -// import basic and product tests for deprecated DynamicSparseMatrix -#if 0 // sparse_basic(DynamicSparseMatrix) does not compile at all -> disabled -static long g_realloc_count = 0; -#define EIGEN_SPARSE_COMPRESSED_STORAGE_REALLOCATE_PLUGIN g_realloc_count++; - -static long g_dense_op_sparse_count = 0; -#define EIGEN_SPARSE_ASSIGNMENT_FROM_DENSE_OP_SPARSE_PLUGIN g_dense_op_sparse_count++; -#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_ADD_DENSE_PLUGIN g_dense_op_sparse_count+=10; -#define EIGEN_SPARSE_ASSIGNMENT_FROM_SPARSE_SUB_DENSE_PLUGIN g_dense_op_sparse_count+=20; - -#define EIGEN_SPARSE_TEST_INCLUDED_FROM_SPARSE_EXTRA 1 -#endif - -#define EIGEN_NO_DEPRECATED_WARNING -// Disable counting of temporaries, since sparse_product(DynamicSparseMatrix) -// has an extra copy-assignment. -#define EIGEN_SPARSE_PRODUCT_IGNORE_TEMPORARY_COUNT #include "sparse_product.cpp" #ifdef min @@ -55,21 +37,6 @@ bool test_random_setter(SparseMatrix& sm, const DenseType& ref, return sm.isApprox(ref); } -template -bool test_random_setter(DynamicSparseMatrix& sm, const DenseType& ref, const std::vector& nonzeroCoords) -{ - sm.setZero(); - std::vector remaining = nonzeroCoords; - while(!remaining.empty()) - { - int i = internal::random(0,static_cast(remaining.size())-1); - sm.coeffRef(remaining[i].x(),remaining[i].y()) = ref.coeff(remaining[i].x(),remaining[i].y()); - remaining[i] = remaining.back(); - remaining.pop_back(); - } - return sm.isApprox(ref); -} - template void sparse_extra(const SparseMatrixType& ref) { const Index rows = ref.rows();