Remove more DynamicSparseMatrix references.

Also fixed some typos in SparseExtra/MarketIO.h.
This commit is contained in:
Antonio Sanchez 2021-09-02 15:34:45 -07:00
parent 3b48a3b964
commit eea2a3385c
2 changed files with 4 additions and 37 deletions

View File

@ -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<typename SparseMatrixType>
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<typename DenseType>
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<typename SparseMatrixType>
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<typename DenseType>

View File

@ -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<Scalar,Options>& sm, const DenseType& ref,
return sm.isApprox(ref);
}
template<typename SetterType,typename DenseType, typename T>
bool test_random_setter(DynamicSparseMatrix<T>& sm, const DenseType& ref, const std::vector<Vector2i>& nonzeroCoords)
{
sm.setZero();
std::vector<Vector2i> remaining = nonzeroCoords;
while(!remaining.empty())
{
int i = internal::random<int>(0,static_cast<int>(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<typename SparseMatrixType> void sparse_extra(const SparseMatrixType& ref)
{
const Index rows = ref.rows();