1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// This Source Code Form is subject to the terms of the Mozilla
5// Public License v. 2.0. If a copy of the MPL was not distributed
6// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8#ifndef EIGEN_ORDERINGMETHODS_MODULE_H
9#define EIGEN_ORDERINGMETHODS_MODULE_H
10
11#include "SparseCore"
12
13#include "src/Core/util/DisableStupidWarnings.h"
14
15/**
16 * \defgroup OrderingMethods_Module OrderingMethods module
17 *
18 * This module is currently for internal use only
19 *
20 * It defines various built-in and external ordering methods for sparse matrices.
21 * They are typically used to reduce the number of elements during
22 * the sparse matrix decomposition (LLT, LU, QR).
23 * Precisely, in a preprocessing step, a permutation matrix P is computed using
24 * those ordering methods and applied to the columns of the matrix.
25 * Using for instance the sparse Cholesky decomposition, it is expected that
26 * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).
27 *
28 *
29 * Usage :
30 * \code
31 * #include <Eigen/OrderingMethods>
32 * \endcode
33 *
34 * A simple usage is as a template parameter in the sparse decomposition classes :
35 *
36 * \code
37 * SparseLU<MatrixType, COLAMDOrdering<int> > solver;
38 * \endcode
39 *
40 * \code
41 * SparseQR<MatrixType, COLAMDOrdering<int> > solver;
42 * \endcode
43 *
44 * It is possible as well to call directly a particular ordering method for your own purpose,
45 * \code
46 * AMDOrdering<int> ordering;
47 * PermutationMatrix<Dynamic, Dynamic, int> perm;
48 * SparseMatrix<double> A;
49 * //Fill the matrix ...
50 *
51 * ordering(A, perm); // Call AMD
52 * \endcode
53 *
54 * \note Some of these methods (like AMD or METIS), need the sparsity pattern
55 * of the input matrix to be symmetric. When the matrix is structurally unsymmetric,
56 * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method.
57 * If your matrix is already symmetric (at leat in structure), you can avoid that
58 * by calling the method with a SelfAdjointView type.
59 *
60 * \code
61 * // Call the ordering on the pattern of the lower triangular matrix A
62 * ordering(A.selfadjointView<Lower>(), perm);
63 * \endcode
64 */
65
66#include "src/OrderingMethods/Amd.h"
67#include "src/OrderingMethods/Ordering.h"
68#include "src/Core/util/ReenableStupidWarnings.h"
69
70#endif // EIGEN_ORDERINGMETHODS_MODULE_H
71