Sparse tensor algebra

Sparse algebra functions combine tensors by coordinate identity or by value-aligned joins. If two tensors share coordinate identity, operations use a direct feature path. Otherwise the operation builds row maps:

\[L_j, R_j \in \{-1, 0, \ldots, N-1\},\]

where -1 means the coordinate is missing from that side of the join.

Join modes follow database-style sparse support semantics: inner keeps coordinates present on both sides, left and right preserve one side, and outer keeps the union.

SparseTensor also provides operator shortcuts for the common binary paths: x + y maps to sparse_add, x - y maps to sparse_sub, and x * y / x & y map to intersection-style sparse_mul. Use the named functions when you need a non-default join or custom fill values.