diff options
author | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2012-07-06 20:18:16 +0200 |
---|---|---|
committer | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2012-07-06 20:18:16 +0200 |
commit | b5a83867cac92a539b3a4d1cf8fcdcf8e9e9f5b2 (patch) | |
tree | 335db33e925cba1313098ec103e9581fe0c3f6aa /Eigen/src/OrderingMethods/Ordering.h | |
parent | 203a0343fdfb83919ffdb486d5375d239a1b2a59 (diff) |
Update Ordering interface
Diffstat (limited to 'Eigen/src/OrderingMethods/Ordering.h')
-rw-r--r-- | Eigen/src/OrderingMethods/Ordering.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/Eigen/src/OrderingMethods/Ordering.h b/Eigen/src/OrderingMethods/Ordering.h index 3751f9bee..670cca9c4 100644 --- a/Eigen/src/OrderingMethods/Ordering.h +++ b/Eigen/src/OrderingMethods/Ordering.h @@ -60,7 +60,9 @@ class AMDOrdering public: typedef PermutationMatrix<Dynamic, Dynamic, Index> PermutationType; - /** Compute the permutation vector from a column-major sparse matrix */ + /** Compute the permutation vector from a sparse matrix + * This routine is much faster if the input matrix is column-major + */ template <typename MatrixType> void operator()(const MatrixType& mat, PermutationType& perm) { @@ -73,7 +75,7 @@ class AMDOrdering internal::minimum_degree_ordering(symm, perm); } - /** Compute the permutation with a self adjoint matrix */ + /** Compute the permutation with a selfadjoint matrix */ template <typename SrcType, unsigned int SrcUpLo> void operator()(const SparseSelfAdjointView<SrcType, SrcUpLo>& mat, PermutationType& perm) { @@ -85,6 +87,26 @@ class AMDOrdering } }; +/** + * Get the natural ordering + * + *NOTE Returns an empty permutation matrix + * \tparam Index The type of indices of the matrix + */ +template <typename Index> +class NaturalOrdering +{ + public: + typedef PermutationMatrix<Dynamic, Dynamic, Index> PermutationType; + + /** Compute the permutation vector from a column-major sparse matrix */ + template <typename MatrixType> + void operator()(const MatrixType& mat, PermutationType& perm) + { + perm.resize(0); + } + +}; /** * Get the column approximate minimum degree ordering |