mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -18,27 +18,26 @@
|
||||
#include "sparse_solver.h"
|
||||
#include <Eigen/SparseLU>
|
||||
|
||||
template<typename T> void test_sparselu_T()
|
||||
{
|
||||
SparseLU<SparseMatrix<T, ColMajor> /*, COLAMDOrdering<int>*/ > sparselu_colamd; // COLAMDOrdering is the default
|
||||
SparseLU<SparseMatrix<T, ColMajor>, AMDOrdering<int> > sparselu_amd;
|
||||
template <typename T>
|
||||
void test_sparselu_T() {
|
||||
SparseLU<SparseMatrix<T, ColMajor> /*, COLAMDOrdering<int>*/> sparselu_colamd; // COLAMDOrdering is the default
|
||||
SparseLU<SparseMatrix<T, ColMajor>, AMDOrdering<int> > sparselu_amd;
|
||||
SparseLU<SparseMatrix<T, ColMajor, long int>, NaturalOrdering<long int> > sparselu_natural;
|
||||
|
||||
check_sparse_square_solving(sparselu_colamd, 300, 100000, true);
|
||||
check_sparse_square_solving(sparselu_amd, 300, 10000, true);
|
||||
check_sparse_square_solving(sparselu_natural, 300, 2000, true);
|
||||
|
||||
|
||||
check_sparse_square_solving(sparselu_colamd, 300, 100000, true);
|
||||
check_sparse_square_solving(sparselu_amd, 300, 10000, true);
|
||||
check_sparse_square_solving(sparselu_natural, 300, 2000, true);
|
||||
|
||||
check_sparse_square_abs_determinant(sparselu_colamd);
|
||||
check_sparse_square_abs_determinant(sparselu_amd);
|
||||
|
||||
|
||||
check_sparse_square_determinant(sparselu_colamd);
|
||||
check_sparse_square_determinant(sparselu_amd);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(sparselu)
|
||||
{
|
||||
CALL_SUBTEST_1(test_sparselu_T<float>());
|
||||
EIGEN_DECLARE_TEST(sparselu) {
|
||||
CALL_SUBTEST_1(test_sparselu_T<float>());
|
||||
CALL_SUBTEST_2(test_sparselu_T<double>());
|
||||
CALL_SUBTEST_3(test_sparselu_T<std::complex<float> >());
|
||||
CALL_SUBTEST_3(test_sparselu_T<std::complex<float> >());
|
||||
CALL_SUBTEST_4(test_sparselu_T<std::complex<double> >());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user