Compute the cell count per dimension of a directed/undirected unweighted flag complex.
From an adjacency matrix construct all cells forming its associated flag complex and compute their number per dimension.
- adjacency_matrix2d ndarray or scipy.sparse matrix, required
Adjacency matrix of a directed/undirected unweighted graph. It is understood as a boolean matrix. Off-diagonal,
Falsevalues denote absent edges while non-
Truevalues denote edges which are present. Diagonal values are ignored.
- directedbool, optional, default:
True, computes homology for the directed flag complex determined by adjacency_matrix. If
False, computes homology for the undirected flag complex obtained by considering all edges as undirected, and it is therefore sufficient (but not necessary) to pass an upper-triangular matrix.
- outlist of int
Cell counts (number of simplices), per dimension greater than or equal to min_dimension and less than max_dimension.
The input graphs cannot contain self-loops, i.e. edges that start and end in the same vertex, therefore diagonal elements of the input adjacency matrix will be ignored.
D. Luetgehetmann, “Documentation of the C++ flagser library”; GitHub: luetge/flagser.