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::supernodal_lu_factor< Value > Struct Template Reference

Result of numeric supernodal LU factorization (same factor layout as lu_numeric, plus the dynamic L-supernode boundaries). More...

#include <supernodal_lu.hpp>

Public Member Functions

std::size_t num_rows () const
std::size_t num_cols () const
std::size_t nsuper () const
const util::csc_matrix< Value > & factorL () const
 Read-only access to the unit lower factor L and the upper factor U (CSC).
const util::csc_matrix< Value > & factorU () const
void set_factor (util::csc_matrix< Value > L, util::csc_matrix< Value > U)
 Install the factors (unit lower L diagonal-first, upper U diagonal-last) and (re)build the coupled forward (L z = w) and upper (U y = z) solve schedules from them.
bool has_factor () const
 True once factors (and their coupled schedules) have been installed.
void set_factor_values (std::vector< Value > Lvals, std::vector< Value > Uvals)
 Install recomputed VALUES on the already-installed factor pattern, keeping the existing solve schedules (see lu_numeric::set_factor_values).
template<typename Accumulator = void, typename VecX, typename VecB>
void solve (VecX &x, const VecB &b) const
 Solve A*x = b.

Public Attributes

std::vector< std::size_t > row_perm
std::vector< std::size_t > row_pinv
std::vector< std::size_t > lsuper_first
std::vector< Value > row_scale
std::size_t num_perturbed = 0
std::size_t panel_updates = 0
 Supernode updates the panel pre-passes applied (#195): one per closed supernode per panel that took it.
supernodal_lu_symbolic symbolic

Detailed Description

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

Result of numeric supernodal LU factorization (same factor layout as lu_numeric, plus the dynamic L-supernode boundaries).

Member Function Documentation

◆ factorL()

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

Read-only access to the unit lower factor L and the upper factor U (CSC).

◆ factorU()

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

◆ has_factor()

template<typename Value>
bool mtl::sparse::factorization::supernodal_lu_factor< Value >::has_factor ( ) const
inline

True once factors (and their coupled schedules) have been installed.

◆ nsuper()

template<typename Value>
std::size_t mtl::sparse::factorization::supernodal_lu_factor< Value >::nsuper ( ) const
inline

◆ num_cols()

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

◆ num_rows()

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

◆ set_factor()

template<typename Value>
void mtl::sparse::factorization::supernodal_lu_factor< Value >::set_factor ( util::csc_matrix< Value > L,
util::csc_matrix< Value > U )
inline

Install the factors (unit lower L diagonal-first, upper U diagonal-last) and (re)build the coupled forward (L z = w) and upper (U y = z) solve schedules from them.

L, U and the schedules are always set together, so the schedules' cached structure always matches the factors' patterns. Strongly exception safe: the schedules are built into locals before any member is replaced. Requires symbolic installed first (validates against symbolic.n).

◆ set_factor_values()

template<typename Value>
void mtl::sparse::factorization::supernodal_lu_factor< Value >::set_factor_values ( std::vector< Value > Lvals,
std::vector< Value > Uvals )
inline

Install recomputed VALUES on the already-installed factor pattern, keeping the existing solve schedules (see lu_numeric::set_factor_values).

The schedules cache positions into L_.values / U_.values, not the values, so a same-pattern refactorization skips the O(nnz) rebuild set_factor pays. Requires a factor already installed and value arrays of exactly the installed nnz; the schedules' built_nnz staleness guards are re-checked, so a pattern change cannot slip through (use set_factor for that). Strongly exception safe: all validation precedes any member replacement.

◆ solve()

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

Solve A*x = b.

P*A*Q = L*U (identical to lu_numeric::solve). 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

◆ lsuper_first

template<typename Value>
std::vector<std::size_t> mtl::sparse::factorization::supernodal_lu_factor< Value >::lsuper_first

◆ num_perturbed

template<typename Value>
std::size_t mtl::sparse::factorization::supernodal_lu_factor< Value >::num_perturbed = 0

◆ panel_updates

template<typename Value>
std::size_t mtl::sparse::factorization::supernodal_lu_factor< Value >::panel_updates = 0

Supernode updates the panel pre-passes applied (#195): one per closed supernode per panel that took it.

0 when panels never ran (panel = 1, or the gate kept them off). A diagnostic: the factor is the same either way, and tests use it to know the panel path ran (issue 926).

◆ row_perm

template<typename Value>
std::vector<std::size_t> mtl::sparse::factorization::supernodal_lu_factor< Value >::row_perm

◆ row_pinv

template<typename Value>
std::vector<std::size_t> mtl::sparse::factorization::supernodal_lu_factor< Value >::row_pinv

◆ row_scale

template<typename Value>
std::vector<Value> mtl::sparse::factorization::supernodal_lu_factor< Value >::row_scale

◆ symbolic

template<typename Value>
supernodal_lu_symbolic mtl::sparse::factorization::supernodal_lu_factor< Value >::symbolic

The documentation for this struct was generated from the following file: