MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
ldlt.hpp File Reference
#include <cassert>
#include <cstddef>
#include <cmath>
#include <limits>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
#include <mtl/detail/pivot_test.hpp>
#include <mtl/concepts/matrix.hpp>
#include <mtl/concepts/vector.hpp>
#include <mtl/concepts/magnitude.hpp>
#include <mtl/math/identity.hpp>
#include <mtl/math/accumulator_traits.hpp>
#include <mtl/functor/scalar/conj.hpp>
#include <mtl/functor/scalar/real.hpp>
#include <mtl/functor/scalar/imag.hpp>
#include <mtl/detail/structure_tol.hpp>

Namespaces

namespace  mtl
namespace  mtl::detail
 mat*vec multiply into pre-allocated y: y = A * x.

Functions

template<typename Accumulator, bool Conj, typename M>
int mtl::detail::ldlt_factor_acc (M &A)
 The accumulator loop of ldlt_factor (Conj = false, A = L D L^T) and ldlt_h_factor (Conj = true, A = L D L^H, D real).
template<typename Accumulator, bool Conj, typename M, typename VecX, typename VecB>
void mtl::detail::ldlt_solve_acc (const M &A, VecX &x, const VecB &b, const char *who)
 The three phases of an LDL^T (Conj = false) or LDL^H (true) solve, with each row's b(i) - sum of products formed in Accumulator and rounded once.
template<typename Accumulator = void, FieldMatrix M>
int mtl::ldlt_factor (M &A)
 LDL^T factorization: A = L * D * L^T.
template<typename Accumulator = void, FieldMatrix M, Vector VecX, Vector VecB>
void mtl::ldlt_solve (const M &A, VecX &x, const VecB &b)
 Solve A*x = b using precomputed LDL^T factors stored in A.
template<typename Accumulator = void, FieldMatrix M>
int mtl::ldlt_h_factor (M &A)
 LDL^H factorization: A = L * D * L^H, for a HERMITIAN matrix.
template<typename Accumulator = void, FieldMatrix M, Vector VecX, Vector VecB>
void mtl::ldlt_h_solve (const M &A, VecX &x, const VecB &b)
 Solve A*x = b using precomputed LDL^H factors stored in A.

Variables

constexpr int mtl::LDLT_NOT_SYMMETRIC = -1
 Returned by ldlt_factor when the input is complex and Hermitian but not symmetric – i.e.
constexpr int mtl::LDLT_NOT_HERMITIAN = -2
 Returned by ldlt_h_factor when the input is complex and has a non-real diagonal, which a Hermitian matrix cannot have – i.e.