1 #ifndef EIGEN_ORDERINGMETHODS_MODULE_H
2 #define EIGEN_ORDERINGMETHODS_MODULE_H
6 #include "src/Core/util/DisableStupidWarnings.h"
9 * \defgroup OrderingMethods_Module OrderingMethods module
11 * This module is currently for internal use only
13 * It defines various built-in and external ordering methods for sparse matrices.
14 * They are typically used to reduce the number of elements during
15 * the sparse matrix decomposition (LLT, LU, QR).
16 * Precisely, in a preprocessing step, a permutation matrix P is computed using
17 * those ordering methods and applied to the columns of the matrix.
18 * Using for instance the sparse Cholesky decomposition, it is expected that
19 * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).
24 * #include <Eigen/OrderingMethods>
27 * A simple usage is as a template parameter in the sparse decomposition classes :
30 * SparseLU<MatrixType, COLAMDOrdering<int> > solver;
34 * SparseQR<MatrixType, COLAMDOrdering<int> > solver;
37 * It is possible as well to call directly a particular ordering method for your own purpose,
39 * AMDOrdering<int> ordering;
40 * PermutationMatrix<Dynamic, Dynamic, int> perm;
41 * SparseMatrix<double> A;
42 * //Fill the matrix ...
44 * ordering(A, perm); // Call AMD
47 * \note Some of these methods (like AMD or METIS), need the sparsity pattern
48 * of the input matrix to be symmetric. When the matrix is structurally unsymmetric,
49 * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method.
50 * If your matrix is already symmetric (at leat in structure), you can avoid that
51 * by calling the method with a SelfAdjointView type.
54 * // Call the ordering on the pattern of the lower triangular matrix A
55 * ordering(A.selfadjointView<Lower>(), perm);
59 #ifndef EIGEN_MPL2_ONLY
60 #include "src/OrderingMethods/Amd.h"
63 #include "src/OrderingMethods/Ordering.h"
64 #include "src/Core/util/ReenableStupidWarnings.h"
66 #endif // EIGEN_ORDERINGMETHODS_MODULE_H