Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::linear_algebra::BlockUpperTriangular< A, B, D > Struct Template Referenceexport

Block-upper-triangular matrix — Tier 2 of #366, the degenerate-Schur case where the lower-left block is zero. More...

Public Types

using top_left = A
using top_right = B
using bottom_right = D
using inverse_type
 Inverse via the degenerate-Schur closed form.

Public Member Functions

constexpr auto inverse () const
template<typename A2, typename B2, typename D2>
constexpr auto operator* (BlockUpperTriangular< A2, B2, D2 >) const
 Block-matrix composition: preserves the upper-triangular shape.
template<typename A2, typename B2, typename D2>
constexpr bool operator== (BlockUpperTriangular< A2, B2, D2 >) const

Detailed Description

template<typename A, typename B, typename D>
struct dedekind::linear_algebra::BlockUpperTriangular< A, B, D >

Block-upper-triangular matrix — Tier 2 of #366, the degenerate-Schur case where the lower-left block is zero.

M = [[ A, B ], [ 0, D ]]

with A, D invertible; B arbitrary (possibly singular); lower-left block the zero matrix.

Inverse (closed form, no Schur complement needed since C = 0 makes the Schur complement S = D - C·A^{-1}·B = D):

M^{-1} = [[ A^{-1}, -A^{-1}·B·D^{-1} ], [ 0, D^{-1} ]]

This is the slice of the block-Schur recurrence that does not require matrix subtraction — a cheap-but-non-trivial advance past DirectSum, already demonstrating the recurrence: invertibility of an assembled block matrix emerges from invertibility of its diagonal blocks.

Member Typedef Documentation

◆ inverse_type

template<typename A, typename B, typename D>
using dedekind::linear_algebra::BlockUpperTriangular< A, B, D >::inverse_type
Initial value:
BlockUpperTriangular<typename A::inverse_type,
decltype(-(
std::declval<typename A::inverse_type>() *
std::declval<const B&>() *
std::declval<typename D::inverse_type>())),
typename D::inverse_type>
Block-upper-triangular matrix — Tier 2 of #366, the degenerate-Schur case where the lower-left block ...
Definition mat2x2.cppm:356

Inverse via the degenerate-Schur closed form.

The top-right entry is -A^{-1}·B·D^{-1}, computed at the type level by chained operator* on matrix types. Uses std::declval so that the type composition does not silently demand that A::inverse_type, B, and D::inverse_type be default-constructible.

Member Function Documentation

◆ operator*()

template<typename A, typename B, typename D>
template<typename A2, typename B2, typename D2>
auto dedekind::linear_algebra::BlockUpperTriangular< A, B, D >::operator* ( BlockUpperTriangular< A2, B2, D2 > ) const
inlineconstexpr

Block-matrix composition: preserves the upper-triangular shape.

[[A1, B1], [0, D1]] · [[A2, B2], [0, D2]]
= [[ A1·A2,  A1·B2 + B1·D2 ],
   [    0,        D1·D2    ]]

All three resulting blocks are derived at the type level; the top-right block uses the Matrix2x2's operator+ for the cross-term sum. std::declval avoids imposing a default-construction requirement on the factor types.


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