LDL factorization¶
Symmetric pivoting¶
The following routines return a pivoted LDL factorization, where the vector \(p\) contains the column indices of the nonzero entries of the permutation matrix \(P\) such that \(PAP^T\) equals either \(LDL^T\) or \(LDL^H\), where \(D\) is quasi-diagonal. The Bunch-Kaufman pivoting rules are used within a higher-performance blocked algorithm, whereas the Bunch-Parlett strategy uses an unblocked, but typically more accurate, algorithm.
Factorization¶
C++ API¶
- 
type LDLPivotType¶
- An enum for specifying the symmetric pivoting strategy. The current (not yet all supported) options include: - BUNCH_KAUFMAN_A
- BUNCH_KAUFMAN_C(not yet supported)
- BUNCH_KAUFMAN_D
- BUNCH_KAUFMAN_BOUNDED(not yet supported)
- BUNCH_PARLETT
- LDL_WITHOUT_PIVOTING
 
- 
template<>
 RealLDLPivotConstant<Real>(LDLPivotType pivotType)¶
- Maps various LDL pivotings schemes to their optimal threshold constant. 
- 
template<>
 typeLDLPivotCtrl<Real>¶
- 
LDLPivotType pivotType¶
- The type of pivoting to perform (by default, - BUNCH_KAUFMAN_A)
 - 
Real gamma¶
- Pivot tolerance (by default, set to - LDLPivotConstant<Real>(pivotType))
 - 
LDLPivotCtrl(LDLPivotType piv = BUNCH_KAUFMAN_A)¶
 
- 
LDLPivotType 
- 
type LDLPivot¶
- 
void LDL(Matrix<F> &A, Matrix<F> &dSub, Matrix<int> &p, bool conjugate = false, const LDLPivotCtrl<Base<F>> &ctrl = LDLPivotCtrl<Base<F>>())¶
- 
void LDL(AbstractDistMatrix<F> &A, AbstractDistMatrix<F> &dSub, AbstractDistMatrix<int> &p, bool conjugate = false, const LDLPivotCtrl<Base<F>> &ctrl = LDLPivotCtrl<Base<F>>())¶
C API¶
- 
ElLDLPivotType¶
- An enum for specifying the symmetric pivoting strategy. The current (not yet all supported) options include: - EL_BUNCH_KAUFMAN_A
- EL_BUNCH_KAUFMAN_C(not yet supported)
- EL_BUNCH_KAUFMAN_D
- EL_BUNCH_KAUFMAN_BOUNDED(not yet supported)
- EL_BUNCH_PARLETT
 
- 
ElLDLPivotCtrl_s¶
- 
ElLDLPivotType pivotType¶
 - 
float gamma¶
 
- 
ElLDLPivotType 
- 
ElLDLPivotCtrl_d¶
- 
ElLDLPivotType pivotType¶
 - 
double gamma¶
 
- 
ElLDLPivotType 
- 
ElLDLPivot¶
- 
Int nb¶
- Whether the pivot is 1x1 or 2x2. 
 - 
Int from[2]
- The source indices of the row or rows to swap with for the 1x1 or 2x2 pivot. 
 
- 
Int 
TODO:: Document expert versions
Python API¶
TODO: Document
Solving linear systems after factorization¶
C++ API¶
- 
void ldl::SolveAfter(const Matrix<F> &A, const Matrix<F> &dSub, const Matrix<int> &p, Matrix<F> &B, bool conjugated = false)¶
- 
void ldl::SolveAfter(const AbstractDistMatrix<F> &A, const AbstractDistMatrix<F> &dSub, const AbstractDistMatrix<int> &p, AbstractDistMatrix<F> &B, bool conjugated = false)¶
C API¶
- 
ElError ElSolveAfterLDLPiv_s(ElConstMatrix_s A, ElConstMatrix_s dSub, ElConstMatrix_i p, ElMatrix_s B)¶
- 
ElError ElSolveAfterLDLPiv_d(ElConstMatrix_d A, ElConstMatrix_d dSub, ElConstMatrix_i p, ElMatrix_d B)¶
- 
ElError ElSolveAfterLDLPiv_c(ElConstMatrix_c A, ElConstMatrix_c dSub, ElConstMatrix_i p, ElMatrix_c B, bool conjugate)¶
- 
ElError ElSolveAfterLDLPiv_z(ElConstMatrix_z A, ElConstMatrix_z dSub, ElConstMatrix_i p, ElMatrix_z B, bool conjugate)¶
- 
ElError ElSolveAfterLDLPivDist_s(ElConstDistMatrix_s A, ElConstDistMatrix_s dSub, ElConstDistMatrix_i p, ElDistMatrix_s B)¶
- 
ElError ElSolveAfterLDLPivDist_d(ElConstDistMatrix_d A, ElConstDistMatrix_d dSub, ElConstDistMatrix_i p, ElDistMatrix_d B)¶
Python API¶
TODO: Document
Multiply vectors after factorization¶
C++ API¶
- 
void ldl::MultiplyAfter(const Matrix<F> &A, const Matrix<F> &dSub, const Matrix<int> &p, Matrix<F> &B, bool conjugated = false)¶
- 
void ldl::MultiplyAfter(const AbstractDistMatrix<F> &A, const AbstractDistMatrix<F> &dSub, const AbstractDistMatrix<int> &p, AbstractDistMatrix<F> &B, bool conjugated = false)¶
C API¶
- 
ElError ElMultiplyAfterLDLPiv_s(ElConstMatrix_s A, ElConstMatrix_s dSub, ElConstMatrix_i p, ElMatrix_s B)¶
- 
ElError ElMultiplyAfterLDLPiv_d(ElConstMatrix_d A, ElConstMatrix_d dSub, ElConstMatrix_i p, ElMatrix_d B)¶
- 
ElError ElMultiplyAfterLDLPiv_c(ElConstMatrix_c A, ElConstMatrix_c dSub, ElConstMatrix_i p, ElMatrix_c B, bool conjugate)¶
- 
ElError ElMultiplyAfterLDLPiv_z(ElConstMatrix_z A, ElConstMatrix_z dSub, ElConstMatrix_i p, ElMatrix_z B, bool conjugate)¶
- 
ElError ElMultiplyAfterLDLPivDist_s(ElConstDistMatrix_s A, ElConstDistMatrix_s dSub, ElConstDistMatrix_i p, ElDistMatrix_s B)¶
- 
ElError ElMultiplyAfterLDLPivDist_d(ElConstDistMatrix_d A, ElConstDistMatrix_d dSub, ElConstDistMatrix_i p, ElDistMatrix_d B)¶
Computing inertia after factorization¶
C++ API¶
- 
InertiaType ldl::Inertia(const Matrix<Base<F>> &d, const Matrix<F> &dSub)¶
- 
InertiaType ldl::Inertia(const AbstractDistMatrix<Base<F>> &d, const AbstractDistMatrix<F> &dSub)¶
C API¶
- 
ElError ElInertiaAfterLDL_s(ElConstMatrix_s d, ElConstMatrix_s dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDL_d(ElConstMatrix_d d, ElConstMatrix_d dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDL_c(ElConstMatrix_s d, ElConstMatrix_c dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDL_z(ElConstMatrix_d d, ElConstMatrix_z dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDLDist_s(ElConstDistMatrix_s d, ElConstDistMatrix_s dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDLDist_d(ElConstDistMatrix_d d, ElConstDistMatrix_d dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDLDist_c(ElConstDistMatrix_s d, ElConstDistMatrix_c dSub, ElInertiaType* inertia)¶
- 
ElError ElInertiaAfterLDLDist_z(ElConstDistMatrix_d d, ElConstDistMatrix_z dSub, ElInertiaType* inertia)¶
No pivoting¶
Though Cholesky factorization is ideal for HPD matrices, unpivoted LDL
factorization naturally applies to a slightly larger, but harder to define,
class of matrices. Upon successful completion of the factorization,
a lower-triangular (with unit diagonal) \(L\) and diagonal matrix \(D\),
such that \(A = L D L^H\) or \(A = L D L^T\), will be returned in the
lower triangle of \(A\).
If a zero pivot is attempted, then a ZeroPivotException will
be thrown.
Factorization¶
Warning
Please use the following routines with caution, as pivoting should be employed in most cases.
C API¶
Solve linear systems after factorization¶
C++ API¶
- 
void ldl::SolveAfter(const AbstractDistMatrix<F> &A, AbstractDistMatrix<F> &B, bool conjugated = false)¶
C API¶
Multiply vectors after factorization¶
C++ API¶
- 
void ldl::MultiplyAfter(const AbstractDistMatrix<F> &A, AbstractDistMatrix<F> &B, bool conjugated = false)¶
