ldlt_ext class

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

ldlt_ext(size_t N) explicit
Construct a new ldlt ext object.
ldlt_ext(const ldlt_ext&) deleted
ldlt_ext(ldlt_ext&&) defaulted

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

ldlt_ext::ldlt_ext(size_t N) explicit

Construct a new ldlt ext object.

Parameters
in dimension

template<typename Mat>
auto ldlt_ext::factorize(const Mat& A) -> bool

Perform LDLT Factorization.

Parameters
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
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