MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::sparse::factorization::ldlt_numeric< Value > Struct Template Reference

Result of numeric LDL^T factorization. More...

#include <sparse_ldlt.hpp>

Public Member Functions

std::size_t num_rows () const
std::size_t num_cols () const
const util::csc_matrix< Value > & factorL () const
 Read-only access to the unit lower factor L (CSC) and the diagonal D.
const std::vector< Value > & diagonal () const
void set_factor (util::csc_matrix< Value > L, std::vector< Value > D)
 Install the factor (unit lower L, diagonal D) and (re)build the coupled unit forward and transpose solve schedules from L.
template<typename Accumulator = void, typename VecX, typename VecB>
void solve (VecX &x, const VecB &b) const
 Solve A*x = b using the LDL^T factorization.

Public Attributes

ldlt_symbolic symbolic

Detailed Description

template<typename Value>
struct mtl::sparse::factorization::ldlt_numeric< Value >

Result of numeric LDL^T factorization.

Contains the unit lower triangular factor L in CSC format, the diagonal D, and the symbolic analysis (for permutation during solve).

Member Function Documentation

◆ diagonal()

template<typename Value>
const std::vector< Value > & mtl::sparse::factorization::ldlt_numeric< Value >::diagonal ( ) const
inline

◆ factorL()

template<typename Value>
const util::csc_matrix< Value > & mtl::sparse::factorization::ldlt_numeric< Value >::factorL ( ) const
inline

Read-only access to the unit lower factor L (CSC) and the diagonal D.

◆ num_cols()

template<typename Value>
std::size_t mtl::sparse::factorization::ldlt_numeric< Value >::num_cols ( ) const
inline

◆ num_rows()

template<typename Value>
std::size_t mtl::sparse::factorization::ldlt_numeric< Value >::num_rows ( ) const
inline

◆ set_factor()

template<typename Value>
void mtl::sparse::factorization::ldlt_numeric< Value >::set_factor ( util::csc_matrix< Value > L,
std::vector< Value > D )
inline

Install the factor (unit lower L, diagonal D) and (re)build the coupled unit forward and transpose solve schedules from L.

L, D and the schedules are always set together, so the schedules' cached structure always matches L's pattern. Strongly exception safe: the schedules are built into locals before any member is replaced.

Precondition: the symbolic analysis (symbolic) MUST be installed first – set_factor validates L and D against symbolic.n. Calling it while symbolic is still default-constructed (n == 0) with a non-empty factor throws (see the guard below), rather than silently accepting a factor that no later solve could use.

◆ solve()

template<typename Value>
template<typename Accumulator = void, typename VecX, typename VecB>
void mtl::sparse::factorization::ldlt_numeric< Value >::solve ( VecX & x,
const VecB & b ) const
inline

Solve A*x = b using the LDL^T factorization.

A = P^T L D L^T P, so x = P^T L^{-T} D^{-1} L^{-1} P b Accumulator (default void, leading as in the numeric phase) selects the accumulator policy of the triangular-solve row reductions (#535): void is the raw Value loop; see level_schedule.hpp for the contract.

Member Data Documentation

◆ symbolic

template<typename Value>
ldlt_symbolic mtl::sparse::factorization::ldlt_numeric< Value >::symbolic

The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/sparse/factorization/sparse_ldlt.hpp