For a commutative semiring S, the current representation of a $n \times m$ matrix in Mat(S) is an $n \times m$ table of S entries, which we can think of as the characteristic function of an $S$-weighted relation. These can become quite sparse, containing many zero block matrices arising from biproduct injections.
An alternative sparse representation would represent the $S$-weighted relation more directly, e.g. as a sorted association list of edges, with matrix composition interpreted as (weighted) relational composition.
For a commutative semiring S, the current representation of a$n \times m$ matrix in Mat(S) is an $n \times m$ table of S entries, which we can think of as the characteristic function of an $S$ -weighted relation. These can become quite sparse, containing many zero block matrices arising from biproduct injections.
An alternative sparse representation would represent the$S$ -weighted relation more directly, e.g. as a sorted association list of edges, with matrix composition interpreted as (weighted) relational composition.