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

Direct sum of two invertibles — the trivial compositional preserver. More...

Public Types

using first_factor = A
using second_factor = B
using inverse_type
 Inverse: block-diagonal of the factor inverses.

Public Member Functions

constexpr auto inverse () const
template<typename A2, typename B2>
constexpr auto operator* (DirectSum< A2, B2 >) const
 Composition: (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B').
template<typename A2, typename B2>
constexpr bool operator== (DirectSum< A2, B2 >) const

Detailed Description

template<typename A, typename B>
struct dedekind::linear_algebra::DirectSum< A, B >

Direct sum of two invertibles — the trivial compositional preserver.

(A ⊕ B) is the block-diagonal operator

[[ A,  0 ],
 [ 0,  B ]]

with (A ⊕ B)^{-1} = A^{-1} ⊕ B^{-1} and (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B').

This is Tier 1 of #366: invertibility of a block-diagonal sum is a consequence of invertibility of the blocks, with no Schur-complement recurrence needed. Cheapest move on the block-composition ladder, and the one that builds arbitrarily-large well-behaved matrices from 2×2 bases "for free" by iteration.

The factors A and B are expected to be types that participate in composition (operator* returning a value of the same structural shape) and expose inverse() returning an inverse_type; Invertible2x2<T, …> is the canonical instance today.

Member Typedef Documentation

◆ inverse_type

template<typename A, typename B>
using dedekind::linear_algebra::DirectSum< A, B >::inverse_type
Initial value:
Direct sum of two invertibles — the trivial compositional preserver.
Definition mat2x2.cppm:296

Inverse: block-diagonal of the factor inverses.

The closed form (A ⊕ B)^{-1} = A^{-1} ⊕ B^{-1} is exact whenever each factor's inverse is exact — here, inherited from Invertible2x2 over Rational<Z>.

Member Function Documentation

◆ operator*()

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

Composition: (A ⊕ B) · (A' ⊕ B') = (A·A') ⊕ (B·B').

The two blocks compose independently; the output is again a DirectSum.


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