mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Remove more DynamicSparseMatrix references.
Also fixed some typos in SparseExtra/MarketIO.h.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user