xref: /aosp_15_r20/external/eigen/test/metis_support.cpp (revision bf2c37156dfe67e5dfebd6d394bad8b2ab5804d4)
1*bf2c3715SXin Li // This file is part of Eigen, a lightweight C++ template library
2*bf2c3715SXin Li // for linear algebra.
3*bf2c3715SXin Li //
4*bf2c3715SXin Li // Copyright (C) 2012 Désiré Nuentsa-Wakam <[email protected]>
5*bf2c3715SXin Li //
6*bf2c3715SXin Li // This Source Code Form is subject to the terms of the Mozilla
7*bf2c3715SXin Li // Public License v. 2.0. If a copy of the MPL was not distributed
8*bf2c3715SXin Li // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9*bf2c3715SXin Li 
10*bf2c3715SXin Li #include "sparse_solver.h"
11*bf2c3715SXin Li #include <Eigen/SparseLU>
12*bf2c3715SXin Li #include <Eigen/MetisSupport>
13*bf2c3715SXin Li #include <unsupported/Eigen/SparseExtra>
14*bf2c3715SXin Li 
test_metis_T()15*bf2c3715SXin Li template<typename T> void test_metis_T()
16*bf2c3715SXin Li {
17*bf2c3715SXin Li   SparseLU<SparseMatrix<T, ColMajor>, MetisOrdering<int> > sparselu_metis;
18*bf2c3715SXin Li 
19*bf2c3715SXin Li   check_sparse_square_solving(sparselu_metis);
20*bf2c3715SXin Li }
21*bf2c3715SXin Li 
EIGEN_DECLARE_TEST(metis_support)22*bf2c3715SXin Li EIGEN_DECLARE_TEST(metis_support)
23*bf2c3715SXin Li {
24*bf2c3715SXin Li   CALL_SUBTEST_1(test_metis_T<double>());
25*bf2c3715SXin Li }
26