Add serialization for sparse matrix and sparse vector.

This commit is contained in:
Antonio Sánchez
2022-11-21 19:43:07 +00:00
parent 044f3f6234
commit e7b1ad0315
4 changed files with 267 additions and 5 deletions

View File

@@ -670,6 +670,12 @@ bool test_isCwiseApprox(const DenseBase<Derived1>& m1,
return true;
}
template <typename Derived1, typename Derived2>
bool test_isCwiseApprox(const SparseMatrixBase<Derived1>& m1,
const SparseMatrixBase<Derived2>& m2, bool exact) {
return test_isCwiseApprox(m1.toDense(), m2.toDense(), exact);
}
template<typename T, typename U>
bool test_is_equal(const T& actual, const U& expected, bool expect_equal)
{