gudhi-devel
gudhi-devel copied to clipboard
Relative homology
Since several users have asked: we should provide an example showing how to use persistence to compute the relative homology of a complex and a subcomplex (mostly how to interpret the result).
I agree. Extended persistence could also be interesting since I have received a few messages from people trying to use Gudhi for computing extended persistence.
Was this issue fixed by #215 ? @mglisse @MathieuCarriere
I don't think #215 contains an example showing how to compute the relative homology of a pair (L,K), so while it is related, it answers a different question.
In a discussion, we mentioned the possibility of adding an API relative_betti_numbers(x,y)
to compute the relative homology of (K_y, K_x)
.
Has there been any progress in this space? If not, what are the possible approaches to compute relative homology of a complex and its subcomplex using the current API? I'd be happy to contribute documentation upon some guidance.
The simplest approach, when you have a small complex S included in a big complex B and you want their relative homology, is to construct the big complex, assign a filtration value of 0 to the cells of S and 1 to the others, and compute persistent homology. The relative homology is then just a matter of interpreting the diagram:
- intervals [0, inf) don't matter
- intervals [1, inf) count normally
- intervals [0,1) have a dimension shift (an edge that kills a connected component in persistent homology actually creates a cycle in relative homology)
Or something similar, I don't promise that I didn't write this too quickly.