The naive persistence engine: the standard reduction algorithm, one cell at a time in filtration order. Each cell's boundary is reduced against the pivots recorded so far; a cell whose boundary reduces to zero opens a class, any other closes the class of its pivot. No clearing or other shortcuts: the reference the other engines are checked against.
persistentHomology(stream) returns a cursor (HomologyState) that processes cells on demand: advanceTo(f), advanceFor(budget), advanceAll(), then diagramAt(f)/barcodeAt(f) for the diagram truncated at any f, with a representative cycle for every bar. The stream decides the top degree: cells of dimension k + 1 are needed for degree k, and the degree-(k + 1) bars of such a stream are incomplete.
Implementation note: chain arithmetic must order cells by the stream's filtration, so the RingModule instance is summoned inside HomologyState, where that ordering exists (a given fixes its own context when it is constructed).
The cursor for the whole stream. A stream that says it was cut off (homologyDegreeLimit, as VietorisRips(.., maxDimension = k) does) is read as persistentHomology(stream, k): the cells above degree k close nothing, so they are not homology.
The cursor for the whole stream. A stream that says it was cut off (homologyDegreeLimit, as VietorisRips(.., maxDimension = k) does) is read as persistentHomology(stream, k): the cells above degree k close nothing, so they are not homology.
The cursor for the degrees 0 .. maxDimension only (fewer for a stream cut off below that, see the whole-stream cursor). The cells above dimension maxDimension + 1 are neither sorted nor reduced, and the cells of dimension maxDimension + 1, which can only close a class of degree maxDimension, leave nothing but the pairing: no V-column, no class of degree maxDimension + 1, and no reduction at all while no class of degree maxDimension is open. The bars of degree 0 .. maxDimension and their representatives are those of the uncapped cursor; there are no bars above maxDimension.
The cursor for the degrees 0 .. maxDimension only (fewer for a stream cut off below that, see the whole-stream cursor). The cells above dimension maxDimension + 1 are neither sorted nor reduced, and the cells of dimension maxDimension + 1, which can only close a class of degree maxDimension, leave nothing but the pairing: no V-column, no class of degree maxDimension + 1, and no reduction at all while no class of degree maxDimension is open. The bars of degree 0 .. maxDimension and their representatives are those of the uncapped cursor; there are no bars above maxDimension.