|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Diagonal matrix carrier M: D dimension × inD → T parametricD and diagonal rule F.
More...

Public Types | |
| using | scalar_type = typename std::remove_cvref_t<F>::Codomain |
| using | rule_domain_type = typename std::remove_cvref_t<F>::Domain |
| using | dimension_type = D |
Public Member Functions | |
| template<typename Idx> requires dedekind::order::IsDirectedSet<Idx> && std::convertible_to<Idx, rule_domain_type> | |
| constexpr scalar_type | at (Idx const &i) const |
Diagonal entry at row = col = i. | |
|
template<typename I, typename J> requires dedekind::order::IsDirectedSet<I> && dedekind::order::IsDirectedSet<J> && std::convertible_to<I, rule_domain_type> && std::convertible_to<J, rule_domain_type> | |
| constexpr scalar_type | operator() (I const &i, J const &j) const |
Matrix entry (i,j) = δ_ij · F(i). Returns T{} off-diagonal. Equality of indices is decided after conversion to the rule's Domain — both I and J need only be net-domain-convertible to it. | |
Public Attributes | |
| F | rule |
Static Public Attributes | |
| static constexpr bool | is_finite = D::is_finite |
Diagonal matrix carrier M: D dimension × inD → T parametricD and diagonal rule F.
| D | Dimension witness (dim_finite<N> or ℵ<N>). |
| F | Diagonal rule, an IsArrow with Domain = size_t and scalar Codomain. |
Stored intensionally — the rule F is the carrier; the dense D is never materialised. Works uniformly at any × tableD entryD, including ℵ_0. Off-diagonal entries are T{} (the additive zero), per the δ_ij convention.
Diagonal is the matrix reading of a Trsk coreflexive dedekind::relational::diag(S) — the partial identity \(\Delta_S = \{(x,x)\mid x\in S\}\). The diagonal rule F is exactly S's characteristic function (over the logic semiring 𝔹), so Diagonal<D, χ_S> ≅ diag(S) and Identity<D> ≅ the full diagonal diag(𝔸) (DiagPred). Both are point-free (rule, not table): the same partial-identity operator on the linear-algebra and relational surfaces. FIXME(#873): the concrete coreflexive↔Diagonal bridge.
|
inlineconstexpr |
Diagonal entry at row = col = i.
Idx is parametric over any IsDirectedSet that converts to the rule's Domain — keeps the eval surface intensional in the index theory (the rule decides what kind of net domain it dispatches on; std::size_t is one inhabitant, ℕ another).