Dissimilarity matrix of a graph is here defined as the number of neighbors shared by any two nodes.
graph.diss(G, sim = FALSE, loops = FALSE)
a \(p*p\) dissimilarity matrix
a \(p*p\) adjacency matrix (dense or sparse) of a graph.
Flag to return Graph similarity instead (1-dissimilarity)
Flag to consider self loops
Bochkina, N. (2015). Selection of the Regularization Parameter in Graphical Models using a Priori Knowledge of Network Structure, arXiv: 1509.05326.