ldlt_ext class
#include <lmisolver/ldlt_ext.hpp>
LDLT factorization for LMI.
- LDL^T square-root-free version
- Option allow semidefinite
- A matrix A in R^{m x m} is positive definite iff v' A v > 0 for all v in R^n.
- O(p^2) per iteration, independent of N
Constructors, destructors, conversion operators
Public functions
-
auto operator=(const ldlt_
ext&) -> ldlt_ ext& deleted -
template<typename Mat>auto factorize(const Mat& A) -> bool -> auto
- Perform LDLT Factorization.
-
template<typename Callable>auto factor(Callable&& getA) -> bool -> auto
- Perform LDLT Factorization (Lazy evaluation)
-
template<typename Callable>auto factor_with_allow_semidefinte(Callable&& getA) -> bool -> auto
- Perform LDLT Factorization (Lazy evaluation)
- auto is_spd() const noexcept -> bool -> auto
- Is $A$ symmetric positive definite (spd)
- auto witness() -> double -> auto
- witness that certifies $A$ is not symmetric positive definite (spd)
-
template<typename Arr036>auto set_witness_vec(Arr036& v) const -> void -> auto
-
template<typename Mat>auto sym_quad(const Mat& A) const -> double -> auto
- Calculate v'*{A}(p,p)*v.
-
template<typename Mat>auto sqrt(Mat& M) -> void -> auto
- Return upper triangular matrix $R$ where $A = R^T R$.
Public variables
- Rng p
- the rows where the process starts and stops
- Vec witness_vec
- witness vector
- const size_t _n
- dimension
Function documentation
template<typename Mat>
auto ldlt_ ext:: factorize(const Mat& A) -> bool
Perform LDLT Factorization.
Parameters | |
---|---|
A in | Symmetric Matrix |
If $A$ is positive definite, then $p$ is zero. If it is not, then $p$ is a positive integer, such that $v = R^-1 e_p$ is a certificate vector to make $v'*A[:p,:p]*v < 0$
Perform LDLT Factorization
If $A$ is positive definite, then $p$ is zero. If it is not, then $p$ is a positive integer, such that $v = R^-1 e_p$ is a certificate vector to make $v'*A[:p,:p]*v < 0$
template<typename Callable>
auto ldlt_ ext:: factor(Callable&& getA) -> bool
Perform LDLT Factorization (Lazy evaluation)
Parameters | |
---|---|
getA in | function to access the elements of A |
See also: factorize()
template<typename Callable>
auto ldlt_ ext:: factor_with_allow_semidefinte(Callable&& getA) -> bool
Perform LDLT Factorization (Lazy evaluation)
Parameters | |
---|---|
getA in | function to access the elements of A |
See also: factorize()
auto ldlt_ ext:: is_spd() const noexcept -> bool
Is $A$ symmetric positive definite (spd)
Returns | true |
---|
auto ldlt_ ext:: witness() -> double
witness that certifies $A$ is not symmetric positive definite (spd)
Returns | auto |
---|
template<typename Mat>
auto ldlt_ ext:: sym_quad(const Mat& A) const -> double
Calculate v'*{A}(p,p)*v.
Parameters | |
---|---|
A in | |
Returns | double |
template<typename Mat>
auto ldlt_ ext:: sqrt(Mat& M) -> void
Return upper triangular matrix $R$ where $A = R^T R$.
Returns | typename ldlt_ext<Arr036>::Mat |
---|
Note: must input a zero matrix