verify_simplicial() builds the clique complex of mat with
build_simplicial() and checks it against two independent references:
its simplices
against the cliques igraph::cliques() finds in the same thresholded
graph, and its Euler characteristic against the alternating sum of its
Betti numbers (the Euler-Poincare theorem). Its print method shows the
result of each check and the Betti numbers; it is meant for testing. It needs
igraph, and raises an error without it.
Usage
verify_simplicial(mat, threshold = 0)
# S3 method for class 'net_simplicial_check'
print(x, ...)Arguments
- mat
A square weight matrix, or a network object whose weight matrix
build_simplicial()reads (anetobject,tnamodel,cograph_networkornet_hon).- threshold
The smallest absolute edge weight an edge needs to enter, as in
build_simplicial(). Default0.- x
For the print() method: a
net_simplicial_checkfrom verify_simplicial().- ...
For the print() method: not used.
Value
A list of class net_simplicial_check: cliques_match (whether
the simplices equal the cliques from igraph::cliques() exactly),
n_simplices_ours, n_simplices_igraph, betti, euler,
euler_matches (whether euler equals the alternating sum of betti)
and f_vector. For the print() method: x, invisibly, after printing
the two checks and the Betti numbers.
Details
The complex is built with the default max_dim = 10, while
igraph::cliques() has no size limit, so a graph with a clique of more
than 11 nodes reports a mismatch, with a warning of class
nestimate_truncated_complex from betti_numbers().