steenroder.sort_filtration_by_dim

steenroder.sort_filtration_by_dim(filtration, maxdim=None)[source]

Organize an input filtration by dimension.

Parameters
  • filtration (sequence of list-like of int) – Represents a simplex-wise filtration. Entry i is a list/tuple/set containing the integer indices of the vertices defining the i th simplex in the filtration.

  • maxdim (int or None, optional, default: None) – Maximum simplex dimension to be included. None means that all simplices are included.

Returns

filtration_by_dim – 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.

Return type

list of list of ndarray