steenroder.compute_reduced_triangular

steenroder.compute_reduced_triangular(filtration_by_dim)[source]

Compute the matrices R and V in the decomposition R = DV.

Explicitly, D is the coboundary matrix of the filtration, R is a reduced matrix, and V is a full-rank upper-triangular one.

Parameters

filtration_by_dim (list of list of ndarray) – For each dimension d, a list of 2 aligned int arrays: the first is a 1D array containing the (ordered) positional indices of all d-dimensional simplices in filtration; the second is a 2D array whose i-th row is the (sorted) collection of vertices defining the i-th d-dimensional simplex.

Returns

  • spx2idx (tuple of numba.typed.Dict) – One dictionary per simplex dimension. The dimension-d dictionary has the filtration d-simplices (tuples of ints) as keys; the corresponding values are the positional indices of those simplices relative to the d-dimensional portion of the filtration.

  • idxs (tuple of ndarray) – For each dimension d, this is the same as filtration_by_dim[d][0] and is returned for convenience.

  • reduced (tuple of numba.typed.List) – One list of int per simplex dimension. reduced[d] is the d-dimensional part of the “R” matrix in R = DV. In the computation, reduced[d][i] is initialized as the coboundary of the i``th input simplex in ``filtration_by_dim[d][1], i.e. as the sorted list of positional indices (relative to the (d+1)-dimensional portion of the filtration) of that simplex’s cofacets.

  • triangular (tuple of numba.typed.List) – On list of int per simplex dimension. triangular[d] is the d-dimensional part of the “V” matrix in R = DV. In the computation, triangular[d][i] is initialized as the singleton list [i].