|
NumericAL
A header-only C++20 lexer built on REAL
|
The symmetric indefinite factorisation of a symmetric or Hermitian matrix, as scipy.linalg.ldl: A = L D Lᴴ (Hermitian) or A = L D Lᵀ (symmetric), Bunch and Kaufman's diagonal pivoting (LAPACK's sytrf, hetrf: by panels of 64 columns from order 384, their trailing update one matrix product; the unblocked sytf2, hetf2 below it and for the last columns) on the lower triangle, or on the upper one (lower = false, L then upper triangular); D block diagonal with blocks of order 1 and 2; L with a unit diagonal once its rows are permuted (permutation), as SciPy returns them.
More...
#include <ldl.hpp>
Public Member Functions | |
| ldl_decomposition (const matrix< T > &a, bool lower=true, bool hermitian=true) | |
Factorises a, of which only the triangle lower names is read. | |
| const matrix< T > & | factor () const noexcept |
L, permuted (SciPy's lu): L[permutation()] is triangular with a unit diagonal. | |
| const matrix< T > & | d () const noexcept |
D, block diagonal (blocks of order 1 and 2). | |
| const std::vector< std::size_t > & | permutation () const noexcept |
The rows' order that makes factor triangular (SciPy's perm). | |
Private Member Functions | |
| void | shape (const buffer< T > &ldu, const std::vector< std::ptrdiff_t > &ipiv, bool lower, bool hermitian) |
L, D and the permutation from LAPACK's packed factors ldu and ipiv, as SciPy's _ldl_sanitize_ipiv, _ldl_get_d_and_l and _ldl_construct_tri_factor form them. | |
Private Attributes | |
| std::size_t | n_ |
| The order. | |
| matrix< T > | l_ |
| L, permuted. | |
| matrix< T > | d_ |
| D. | |
| std::vector< std::size_t > | permutation_ |
| The rows' order making L triangular. | |
The symmetric indefinite factorisation of a symmetric or Hermitian matrix, as scipy.linalg.ldl: A = L D Lᴴ (Hermitian) or A = L D Lᵀ (symmetric), Bunch and Kaufman's diagonal pivoting (LAPACK's sytrf, hetrf: by panels of 64 columns from order 384, their trailing update one matrix product; the unblocked sytf2, hetf2 below it and for the last columns) on the lower triangle, or on the upper one (lower = false, L then upper triangular); D block diagonal with blocks of order 1 and 2; L with a unit diagonal once its rows are permuted (permutation), as SciPy returns them.
| T | double or std::complex<double>. |
|
inlineexplicit |
Factorises a, of which only the triangle lower names is read.
| [in] | a | The square matrix. |
| [in] | lower | The lower triangle (and a lower L), or the upper. |
| [in] | hermitian | For a complex matrix, A = Aᴴ (the diagonal's imaginary parts ignored) or A = Aᵀ; a real one's either. |
| dimension_error | If a is not square. |
| non_finite_error | If an entry is infinite or NaN. |
|
inlinenoexcept |
|
inlinenoexcept |
L, permuted (SciPy's lu): L[permutation()] is triangular with a unit diagonal.
|
inlinenoexcept |
|
private |
|
private |
|
private |
|
private |