find_cliques#

iskra.topology.find_cliques(edges: Tensor, max_d: int) list[Tensor][SOURCE]#

Finds all cliques in a graph for all sizes up to max_d.

Given an edge soup, this helps us find all simplices up that can be formed by combining the different edges that have common vertices. Taken from https://stackoverflow.com/questions/48081912/converting-adjacency-matrix-to-abstract-simplicial-complex.

Parameters:
  • edges (Tensor[Int64, [E, 2]]) – Edge-vertex indices.

  • max_d (int, optional) – The number of vertices in the largest requested simplex. E.g. max_d=4 will return all possible simplices up to and including tetrahedra.

Returns:

(list[Tensor]) – list of tensors such that the Nth tensor contains the simplices with N vertices.