|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
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 |
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.
| using dedekind::linear_algebra::BlockUpperTriangular< A, B, D >::inverse_type |
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.
|
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.