The map on persistent homology that a map of filtered complexes induces, and its image, kernel and cokernel as barcodes: what survives from the smaller space in the larger, what dies on the way in, and what only the larger one sees.
val sub = Persistence(points.take(30), maxDimension = 2, includeZeroLength = true)
val whole = Persistence(points, maxDimension = 2, includeZeroLength = true)
val inclusion = PersistenceMap.inclusion(sub, whole)
inclusion.image(1) // the loops of the subsample, as far as they stay loops in the whole
inclusion.cokernel(1) // the loops that only the whole sample has
For each degree the matrix has a row for each bar of the target and a column for each bar of the source: column i is the pushforward of the source bar's representative cycle, written in the target's bars at the time the source bar is born. The bars are those of the diagrams without the zero-length ones (a class that never exists), and sourceBars and targetBars give them in the order the matrix uses.
The map must send each cell to a chain of cells that have already entered the target by the time the cell enters the source (it preserves the filtration). Both diagrams need representative cycles and the cells of their bars (the default of Persistence); the target must keep its zero-length bars, includeZeroLength = true, because their representatives are part of what the reduction reads. They must be over the same field: the same characteristic (or the same coefficients).
Attributes
See also
MapAlgebra for the image, kernel and cokernel of a map of barcodes that you write down yourself
The nonzero entries of the matrix in degree k as (source bar, target bar, coefficient), the bars as positions in sourceBars and targetBars, by source bar and then target bar.
The nonzero entries of the matrix in degree k as (source bar, target bar, coefficient), the bars as positions in sourceBars and targetBars, by source bar and then target bar.
The bars of the image in degree k: the classes of the source that are not zero in the target, from the birth of the class to the death of the component of the target it lands in.
The bars of the image in degree k: the classes of the source that are not zero in the target, from the birth of the class to the death of the component of the target it lands in.