You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

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