petls.sheaf_simplex_tree.apply_restriction_function#
- sheaf_simplex_tree.apply_restriction_function() tuple[list[array], list[list[float]]] [source]#
Get coboundaries and filtrations
- Returns:
- tuple[list[np.array],list[list[float]]]
The first element of the tuple is a list of coboundary matrices, the second element is a list of filtrations (one list[float] per dimension)
Examples
>>> st = gudhi.simplex_tree(...) >>> def my_restriction(simplex, coface, sst): ... return coeff # float >>> extra_data = {} >>> sst = sheaf_simplex_tree(st, extra_data, my_restriction) >>> [coboundaries, filtrations] = sst.apply_restriction_function() >>> print(coboundaries) [ array([[-5., 0., 2.], [0., -5., 3.], [-3., 2., 0.]]), array([[-3., 2., 5.]]) ] >>> print(filtrations) [[0.0, 0.0, 0.0], [1.0, 1.0, 1.0], [1.0]]