Computes 0-dimensional persistent homology for a graph based on vertex function values. This tracks the birth and death of connected components during a filtration process.
Arguments
- adj.list
A list where each element contains the indices of adjacent vertices.
- y
A numeric vector of function values at vertices.
- n.top.basins
Integer; number of top persistence basins to return (default: 4).
- alpha
Numeric between 0 and 1; weight parameter for weighted persistence (default: 0.5). Only used when
weighted = TRUE.
Value
A list containing:
- persistence
Data frame with persistence information for each component
- basins
List of vertex sets for the top persistence basins
Details
For unweighted graphs, the algorithm processes vertices in decreasing order of function values, tracking when connected components merge. For weighted graphs, the death values incorporate both vertex values and edge weights.
The persistence of a component quantifies its significance, with higher values indicating more prominent topological features.