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