steenroder.compute_barcode_and_coho_reps

steenroder.compute_barcode_and_coho_reps(idxs, reduced, triangular, filtration_values=None)[source]

Compute the barcode of relative cohomology and cocycle representatives.

Parameters
  • idxs (tuple of ndarray) – For each dimension d, a 1D int array containing the (ordered) positional indices of all d-dimensional simplices in the filtration.

  • reduced (tuple of numba.typed.List) – One list of int per simplex dimension, representing the d-dimensional part of the “R” matrix in R = DV. In the same format as returned by compute_reduced_triangular.

  • triangular (tuple of numba.typed.List) – One list of int per simplex dimension, representing the d-dimensional part of the “V” matrix in R = DV. In the same format as returned by compute_reduced_triangular.

  • filtration_values (ndarray or None, optional, default: None) – Optionally, a single 1D array of filtration values for each simplex in the filtration and in all dimensions contained in idxs, reduced and triangular. Bars with equal birth and death filtration values are discarded.

Returns

  • barcode (list of ndarray) – For each dimension d, a 2D int array of shape (n_bars, 2) containing the birth (entry 1) and death (entry 0) indices of persistent relative homology classes in degree d. See filtration_values. Essential bars are represented by pairs with death equal to -1. Bars are sorted in order of decreasing birth indices.

  • coho_reps (list of numba.typed.List) – For each dimension d, a list of representatives of persistent relative cohomology classes in degree d. Each such representative is represented as a list of positional indices relative to the d-dimensional portion of the filtration. coho_reps[d][j] corresponds to barcode[d][j].