Eigen::AMDOrdering< StorageIndex > Class Template Reference

#include <Ordering.h>

Public Types

typedef PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
 

Public Member Functions

template<typename MatrixType >
void operator() (const MatrixType &mat, PermutationType &perm)
 
template<typename SrcType , unsigned int SrcUpLo>
void operator() (const SparseSelfAdjointView< SrcType, SrcUpLo > &mat, PermutationType &perm)
 

Detailed Description

template<typename StorageIndex>
class Eigen::AMDOrdering< StorageIndex >

Functor computing the approximate minimum degree ordering If the matrix is not structurally symmetric, an ordering of A^T+A is computed

Template Parameters
StorageIndexThe type of indices of the matrix
See also
COLAMDOrdering

Member Typedef Documentation

◆ PermutationType

template<typename StorageIndex >
typedef PermutationMatrix<Dynamic, Dynamic, StorageIndex> Eigen::AMDOrdering< StorageIndex >::PermutationType

Member Function Documentation

◆ operator()() [1/2]

template<typename StorageIndex >
template<typename MatrixType >
void Eigen::AMDOrdering< StorageIndex >::operator() ( const MatrixType mat,
PermutationType perm 
)
inline

Compute the permutation vector from a sparse matrix This routine is much faster if the input matrix is column-major

58  {
59  // Compute the symmetric pattern
60  SparseMatrix<typename MatrixType::Scalar, ColMajor, StorageIndex> symm;
62 
63  // Call the AMD routine
64  // m_mat.prune(keep_diag());
66  }
void ordering_helper_at_plus_a(const MatrixType &A, MatrixType &symmat)
Definition: Ordering.h:30
void minimum_degree_ordering(SparseMatrix< Scalar, ColMajor, StorageIndex > &C, PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm)
Definition: Amd.h:92
void symm(int size=Size, int othersize=OtherSize)
Definition: product_symm.cpp:13

References Eigen::internal::minimum_degree_ordering(), Eigen::internal::ordering_helper_at_plus_a(), and symm().

◆ operator()() [2/2]

template<typename StorageIndex >
template<typename SrcType , unsigned int SrcUpLo>
void Eigen::AMDOrdering< StorageIndex >::operator() ( const SparseSelfAdjointView< SrcType, SrcUpLo > &  mat,
PermutationType perm 
)
inline

Compute the permutation with a selfadjoint matrix

70  {
71  SparseMatrix<typename SrcType::Scalar, ColMajor, StorageIndex> C;
72  C = mat;
73 
74  // Call the AMD routine
75  // m_mat.prune(keep_diag()); //Remove the diagonal elements
77  }
Eigen::SparseMatrix< double > mat
Definition: EigenUnitTest.cpp:10
Matrix< Scalar, Dynamic, Dynamic > C
Definition: bench_gemm.cpp:49
Definition: matrices.h:74

References Eigen::internal::minimum_degree_ordering().


The documentation for this class was generated from the following file: