Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::linear_algebra::OuterProduct< U, V, Mult > Struct Template Referenceexport

Rank-1 matrix M = u⊗v with M[i][j] = u(i)⊗v(j), the product taken in a semiring. More...

Collaboration diagram for dedekind::linear_algebra::OuterProduct< U, V, Mult >:

Public Types

using scalar_type = typename std::remove_cvref_t<U>::Codomain
using mult_type = Mult
using row_domain_type = typename std::remove_cvref_t<U>::Domain
using col_domain_type = typename std::remove_cvref_t<V>::Domain

Public Member Functions

template<typename I, typename J>
requires dedekind::order::IsDirectedSet<I> && dedekind::order::IsDirectedSet<J> && std::convertible_to<I, row_domain_type> && std::convertible_to<J, col_domain_type>
constexpr scalar_type operator() (I const &i, J const &j) const
 Entry (i, j) = u(i) · v(j). Each axis is intensional in its factor's Domain — the row index runs in U::Domain, the column index in V::Domain (the two can differ).

Public Attributes

U u
V v

Detailed Description

template<typename U, typename V, typename Mult = std::multiplies<typename std::remove_cvref_t<U>::Codomain>>
requires dedekind::category::IsArrow<U> && dedekind::category::IsArrow<V>
struct dedekind::linear_algebra::OuterProduct< U, V, Mult >

Rank-1 matrix M = u⊗v with M[i][j] = u(i)⊗v(j), the product taken in a semiring.

diagonal__OuterProduct_Carrier

Template Parameters
ULeft factor (IsArrow with size_t domain).
VRight factor (IsArrow with size_t domain, same scalar codomain as U).
MultThe scalar product functor ⊗. Defaults to std::multiplies (the ring ·, so every existing call site and witness is unchanged), but any semiring ⊗ is admissible — pass dedekind::algebra::semiring_ops<T>::mult to build a tropical dyad (⊗ = +), which the :transfer partition folds into the bra·ket eigenvalue. This is the sole hook that lets a max-plus carrier — which has no C++ operator* — be a rank-1 matrix entry type.

Stored intensionally — neither factor needs to be dense-materialised. Either or both factors may be infinite-dimensional intensional sequences (e.g. dedekind::sequences::Path<T>); the outer product itself carries no dense m×n storage.


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