mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Cleaning documentation pass in ordering and ILUT
This commit is contained in:
parent
38fa432e07
commit
7262cf783c
@ -15,7 +15,7 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
/**
|
||||
/** \internal
|
||||
* Compute a quick-sort split of a vector
|
||||
* On output, the vector row is permuted such that its elements satisfy
|
||||
* abs(row(i)) >= abs(row(ncut)) if i<ncut
|
||||
@ -60,8 +60,11 @@ int QuickSplit(VectorV &row, VectorI &ind, int ncut)
|
||||
}
|
||||
|
||||
}// end namespace internal
|
||||
/**
|
||||
|
||||
/** \ingroup IterativeLinearSolvers_Module
|
||||
* \class IncompleteLUT
|
||||
* \brief Incomplete LU factorization with dual-threshold strategy
|
||||
*
|
||||
* During the numerical factorization, two dropping rules are used :
|
||||
* 1) any element whose magnitude is less than some tolerance is dropped.
|
||||
* This tolerance is obtained by multiplying the input tolerance @p droptol
|
||||
@ -462,4 +465,3 @@ struct solve_retval<IncompleteLUT<_MatrixType>, Rhs>
|
||||
} // end namespace Eigen
|
||||
|
||||
#endif // EIGEN_INCOMPLETE_LUT_H
|
||||
|
||||
|
@ -86,6 +86,7 @@ Index cs_tdfs(Index j, Index k, Index *head, const Index *next, Index *post, Ind
|
||||
|
||||
|
||||
/** \internal
|
||||
* \ingroup OrderingMethods_Module
|
||||
* Approximate minimum degree ordering algorithm.
|
||||
* \returns the permutation P reducing the fill-in of the input matrix \a C
|
||||
* The input matrix \a C must be a selfadjoint compressed column major SparseMatrix object. Both the upper and lower parts have to be stored, but the diagonal entries are optional.
|
||||
|
@ -33,13 +33,14 @@ namespace Eigen {
|
||||
|
||||
namespace internal {
|
||||
|
||||
/**
|
||||
* Get the symmetric pattern A^T+A from the input matrix A.
|
||||
/** \internal
|
||||
* \ingroup OrderingMethods_Module
|
||||
* \returns the symmetric pattern A^T+A from the input matrix A.
|
||||
* FIXME: The values should not be considered here
|
||||
*/
|
||||
template<typename MatrixType>
|
||||
void ordering_helper_at_plus_a(const MatrixType& mat, MatrixType& symmat)
|
||||
{
|
||||
template<typename MatrixType>
|
||||
void ordering_helper_at_plus_a(const MatrixType& mat, MatrixType& symmat)
|
||||
{
|
||||
MatrixType C;
|
||||
C = mat.transpose(); // NOTE: Could be costly
|
||||
for (int i = 0; i < C.rows(); i++)
|
||||
@ -48,14 +49,17 @@ namespace internal {
|
||||
it.valueRef() = 0.0;
|
||||
}
|
||||
symmat = C + mat;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the approximate minimum degree ordering
|
||||
/** \ingroup OrderingMethods_Module
|
||||
* \class AMDOrdering
|
||||
*
|
||||
* 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
|
||||
* \tparam Index The type of indices of the matrix
|
||||
* \sa COLAMDOrdering
|
||||
*/
|
||||
template <typename Index>
|
||||
class AMDOrdering
|
||||
@ -90,10 +94,12 @@ class AMDOrdering
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the natural ordering
|
||||
/** \ingroup OrderingMethods_Module
|
||||
* \class NaturalOrdering
|
||||
*
|
||||
*NOTE Returns an empty permutation matrix
|
||||
* Functor computing the natural ordering (identity)
|
||||
*
|
||||
* \note Returns an empty permutation matrix
|
||||
* \tparam Index The type of indices of the matrix
|
||||
*/
|
||||
template <typename Index>
|
||||
@ -111,20 +117,19 @@ class NaturalOrdering
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the column approximate minimum degree ordering
|
||||
/** \ingroup OrderingMethods_Module
|
||||
* \class COLAMDOrdering
|
||||
*
|
||||
* Functor computing the \em column \em approximate \em minimum \em degree ordering
|
||||
* The matrix should be in column-major format
|
||||
*/
|
||||
template<typename Index>
|
||||
class COLAMDOrdering;
|
||||
#include "Eigen_Colamd.h"
|
||||
|
||||
template<typename Index>
|
||||
class COLAMDOrdering
|
||||
{
|
||||
public:
|
||||
typedef PermutationMatrix<Dynamic, Dynamic, Index> PermutationType;
|
||||
typedef Matrix<Index, Dynamic, 1> IndexVector;
|
||||
|
||||
/** Compute the permutation vector form a sparse matrix */
|
||||
template <typename MatrixType>
|
||||
void operator() (const MatrixType& mat, PermutationType& perm)
|
||||
@ -149,10 +154,9 @@ class COLAMDOrdering
|
||||
|
||||
perm.resize(n);
|
||||
for (int i = 0; i < n; i++) perm.indices()(p(i)) = i;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user