Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klausc/ldufacts.jl
P' L D L' P factorization of symmetric real or hermitian indefinite matrices
https://github.com/klausc/ldufacts.jl
factorize hermitian indefinite linear-algebra symmetric
Last synced: 8 days ago
JSON representation
P' L D L' P factorization of symmetric real or hermitian indefinite matrices
- Host: GitHub
- URL: https://github.com/klausc/ldufacts.jl
- Owner: KlausC
- License: mit
- Created: 2022-02-10T11:53:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-21T16:02:23.000Z (almost 3 years ago)
- Last Synced: 2024-10-19T17:46:50.409Z (3 months ago)
- Topics: factorize, hermitian, indefinite, linear-algebra, symmetric
- Language: Julia
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LDUFacts
[![Build Status][gha-img]][gha-url] [![Coverage Status][codecov-img]][codecov-url]
## Introduction
This package is dedicated to the L-D-Lt factorization of symmetric real and Hermitian matrices.
In contrast to Cholesky factorization, which is appropriate for most use cases, it has the following features:
- handle also the indefinite case (Cholesky requires positive (semi)-definite)
- square-root free algorithm
- exact operation with real and complex rational types
- exact operation with user-defined field types
- option of full pivot search## Algorithm
Factors `P, L, D` of matrix `A` are found in a way, that `P' * A * P = L * D * L'`.
Here `D` is diagonal and real, `L` is lower unit triangular, and `P` is a 'simple' square matrix.
With diagonal pivot search, `P` is a permutation matrix, with full pivot search up to `n-1` nonzero additional matrix elements may occur.
Without pivot search, `P` is the unit matrix.When not a full pivot search is done, it is possible, that the algorithm fails before the factors are found.
For positive definite matrices, the no-pivot version is guaranteed to succeed. For positive semi-definite matrices,
a diagonal pivot search always succeeds, for infefinite matrices, a full pivot search is required for that.There are examples of regular matrices, (e.g. `[0. 1; 1 0]`), which do not have any factorization where `P` is a permutation. For those cases
the full pivot search is required.## Usage
]add LDUFacts
using LDUFacts
A = Matrix(Symmetric(rand(5, 5)))
la = ldu(A, FullPivot())
issuccess(la)
rank(la)
la.L
la.d
la.P' * A * la.P - la.L * la.D * la.L' # should be close to zero[gha-img]: https://github.com/KlausC/LDUFacts.jl/actions/workflows/CI.yml/badge.svg
[gha-url]: https://github.com/KlausC/LDUFacts.jl/actions/workflows/CI.yml[codecov-img]: https://codecov.io/gh/KlausC/LDUFacts.jl/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/KlausC/LDUFacts.jl