|
1 |
| -//! Solve symmetric linear problem using the Bunch-Kaufman diagonal pivoting method. |
2 |
| -//! |
3 |
| -//! See also [the manual of dsytrf](http://www.netlib.org/lapack/lapack-3.1.1/html/dsytrf.f.html) |
4 |
| -
|
5 | 1 | use crate::{error::*, layout::MatrixLayout, *};
|
6 | 2 | use cauchy::*;
|
7 | 3 | use num_traits::{ToPrimitive, Zero};
|
8 | 4 |
|
| 5 | +#[cfg_attr(doc, katexit::katexit)] |
| 6 | +/// Solve symmetric/hermite indefinite linear problem using the [Bunch-Kaufman diagonal pivoting method][BK]. |
| 7 | +/// |
| 8 | +/// For a given symmetric matrix $A$, |
| 9 | +/// this method factorizes $A = U^T D U$ or $A = L D L^T$ where |
| 10 | +/// |
| 11 | +/// - $U$ (or $L$) are is a product of permutation and unit upper (lower) triangular matrices |
| 12 | +/// - $D$ is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. |
| 13 | +/// |
| 14 | +/// This takes two-step approach based in LAPACK: |
| 15 | +/// |
| 16 | +/// 1. Factorize given matrix $A$ into upper ($U$) or lower ($L$) form with diagonal matrix $D$ |
| 17 | +/// 2. Then solve linear equation $Ax = b$, and/or calculate inverse matrix $A^{-1}$ |
| 18 | +/// |
| 19 | +/// [BK]: https://doi.org/10.2307/2005787 |
| 20 | +/// |
9 | 21 | pub trait Solveh_: Sized {
|
10 |
| - /// Bunch-Kaufman: wrapper of `*sytrf` and `*hetrf` |
| 22 | + /// Factorize input matrix using Bunch-Kaufman diagonal pivoting method |
| 23 | + /// |
| 24 | + /// LAPACK correspondance |
| 25 | + /// ---------------------- |
| 26 | + /// |
| 27 | + /// | f32 | f64 | c32 | c64 | |
| 28 | + /// |:---------|:---------|:---------|:---------| |
| 29 | + /// | [ssytrf] | [dsytrf] | [chetrf] | [zhetrf] | |
| 30 | + /// |
| 31 | + /// [ssytrf]: https://netlib.org/lapack/explore-html/d0/d14/group__real_s_ycomputational_ga12d2e56511cf7df066712c61d9acec45.html |
| 32 | + /// [dsytrf]: https://netlib.org/lapack/explore-html/d3/db6/group__double_s_ycomputational_gad91bde1212277b3e909eb6af7f64858a.html |
| 33 | + /// [chetrf]: https://netlib.org/lapack/explore-html/d4/d74/group__complex_h_ecomputational_ga081dd1908e46d064c2bf0a1f6b664b86.html |
| 34 | + /// [zhetrf]: https://netlib.org/lapack/explore-html/d3/d80/group__complex16_h_ecomputational_gadc84a5c9818ee12ea19944623131bd52.html |
| 35 | + /// |
11 | 36 | fn bk(l: MatrixLayout, uplo: UPLO, a: &mut [Self]) -> Result<Pivot>;
|
12 | 37 | /// Wrapper of `*sytri` and `*hetri`
|
13 | 38 | fn invh(l: MatrixLayout, uplo: UPLO, a: &mut [Self], ipiv: &Pivot) -> Result<()>;
|
|
0 commit comments