mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Fix Index vs StorageIndex naming convention
This commit is contained in:
parent
ef2b54f422
commit
2795ffd6a0
@ -44,14 +44,14 @@ void ordering_helper_at_plus_a(const MatrixType& mat, MatrixType& symmat)
|
|||||||
*
|
*
|
||||||
* Functor computing the \em approximate \em minimum \em degree ordering
|
* Functor computing the \em approximate \em minimum \em degree ordering
|
||||||
* If the matrix is not structurally symmetric, an ordering of A^T+A is computed
|
* If the matrix is not structurally symmetric, an ordering of A^T+A is computed
|
||||||
* \tparam Index The type of indices of the matrix
|
* \tparam StorageIndex The type of indices of the matrix
|
||||||
* \sa COLAMDOrdering
|
* \sa COLAMDOrdering
|
||||||
*/
|
*/
|
||||||
template <typename Index>
|
template <typename StorageIndex>
|
||||||
class AMDOrdering
|
class AMDOrdering
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef PermutationMatrix<Dynamic, Dynamic, Index> PermutationType;
|
typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> PermutationType;
|
||||||
|
|
||||||
/** Compute the permutation vector from a sparse matrix
|
/** Compute the permutation vector from a sparse matrix
|
||||||
* This routine is much faster if the input matrix is column-major
|
* This routine is much faster if the input matrix is column-major
|
||||||
@ -60,7 +60,7 @@ class AMDOrdering
|
|||||||
void operator()(const MatrixType& mat, PermutationType& perm)
|
void operator()(const MatrixType& mat, PermutationType& perm)
|
||||||
{
|
{
|
||||||
// Compute the symmetric pattern
|
// Compute the symmetric pattern
|
||||||
SparseMatrix<typename MatrixType::Scalar, ColMajor, Index> symm;
|
SparseMatrix<typename MatrixType::Scalar, ColMajor, StorageIndex> symm;
|
||||||
internal::ordering_helper_at_plus_a(mat,symm);
|
internal::ordering_helper_at_plus_a(mat,symm);
|
||||||
|
|
||||||
// Call the AMD routine
|
// Call the AMD routine
|
||||||
@ -72,7 +72,7 @@ class AMDOrdering
|
|||||||
template <typename SrcType, unsigned int SrcUpLo>
|
template <typename SrcType, unsigned int SrcUpLo>
|
||||||
void operator()(const SparseSelfAdjointView<SrcType, SrcUpLo>& mat, PermutationType& perm)
|
void operator()(const SparseSelfAdjointView<SrcType, SrcUpLo>& mat, PermutationType& perm)
|
||||||
{
|
{
|
||||||
SparseMatrix<typename SrcType::Scalar, ColMajor, Index> C; C = mat;
|
SparseMatrix<typename SrcType::Scalar, ColMajor, StorageIndex> C; C = mat;
|
||||||
|
|
||||||
// Call the AMD routine
|
// Call the AMD routine
|
||||||
// m_mat.prune(keep_diag()); //Remove the diagonal elements
|
// m_mat.prune(keep_diag()); //Remove the diagonal elements
|
||||||
@ -88,7 +88,7 @@ class AMDOrdering
|
|||||||
* Functor computing the natural ordering (identity)
|
* Functor computing the natural ordering (identity)
|
||||||
*
|
*
|
||||||
* \note Returns an empty permutation matrix
|
* \note Returns an empty permutation matrix
|
||||||
* \tparam Index The type of indices of the matrix
|
* \tparam StorageIndex The type of indices of the matrix
|
||||||
*/
|
*/
|
||||||
template <typename StorageIndex>
|
template <typename StorageIndex>
|
||||||
class NaturalOrdering
|
class NaturalOrdering
|
||||||
@ -108,6 +108,8 @@ class NaturalOrdering
|
|||||||
/** \ingroup OrderingMethods_Module
|
/** \ingroup OrderingMethods_Module
|
||||||
* \class COLAMDOrdering
|
* \class COLAMDOrdering
|
||||||
*
|
*
|
||||||
|
* \tparam StorageIndex The type of indices of the matrix
|
||||||
|
*
|
||||||
* Functor computing the \em column \em approximate \em minimum \em degree ordering
|
* Functor computing the \em column \em approximate \em minimum \em degree ordering
|
||||||
* The matrix should be in column-major and \b compressed format (see SparseMatrix::makeCompressed()).
|
* The matrix should be in column-major and \b compressed format (see SparseMatrix::makeCompressed()).
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user