Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/eigen3/Eigen/OrderingMethods is written in an unsupported language. File is not indexed.

0001 // This file is part of Eigen, a lightweight C++ template library
0002 // for linear algebra.
0003 //
0004 // This Source Code Form is subject to the terms of the Mozilla
0005 // Public License v. 2.0. If a copy of the MPL was not distributed
0006 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
0007 
0008 #ifndef EIGEN_ORDERINGMETHODS_MODULE_H
0009 #define EIGEN_ORDERINGMETHODS_MODULE_H
0010 
0011 #include "SparseCore"
0012 
0013 #include "src/Core/util/DisableStupidWarnings.h"
0014 
0015 /** 
0016   * \defgroup OrderingMethods_Module OrderingMethods module
0017   *
0018   * This module is currently for internal use only
0019   * 
0020   * It defines various built-in and external ordering methods for sparse matrices. 
0021   * They are typically used to reduce the number of elements during 
0022   * the sparse matrix decomposition (LLT, LU, QR).
0023   * Precisely, in a preprocessing step, a permutation matrix P is computed using 
0024   * those ordering methods and applied to the columns of the matrix. 
0025   * Using for instance the sparse Cholesky decomposition, it is expected that 
0026   * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).
0027   * 
0028   * 
0029   * Usage : 
0030   * \code
0031   * #include <Eigen/OrderingMethods>
0032   * \endcode
0033   * 
0034   * A simple usage is as a template parameter in the sparse decomposition classes : 
0035   * 
0036   * \code 
0037   * SparseLU<MatrixType, COLAMDOrdering<int> > solver;
0038   * \endcode 
0039   * 
0040   * \code 
0041   * SparseQR<MatrixType, COLAMDOrdering<int> > solver;
0042   * \endcode
0043   * 
0044   * It is possible as well to call directly a particular ordering method for your own purpose, 
0045   * \code 
0046   * AMDOrdering<int> ordering;
0047   * PermutationMatrix<Dynamic, Dynamic, int> perm;
0048   * SparseMatrix<double> A; 
0049   * //Fill the matrix ...
0050   * 
0051   * ordering(A, perm); // Call AMD
0052   * \endcode
0053   * 
0054   * \note Some of these methods (like AMD or METIS), need the sparsity pattern 
0055   * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, 
0056   * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method.
0057   * If your matrix is already symmetric (at leat in structure), you can avoid that
0058   * by calling the method with a SelfAdjointView type.
0059   * 
0060   * \code
0061   *  // Call the ordering on the pattern of the lower triangular matrix A
0062   * ordering(A.selfadjointView<Lower>(), perm);
0063   * \endcode
0064   */
0065 
0066 #include "src/OrderingMethods/Amd.h"
0067 #include "src/OrderingMethods/Ordering.h"
0068 #include "src/Core/util/ReenableStupidWarnings.h"
0069 
0070 #endif // EIGEN_ORDERINGMETHODS_MODULE_H