Learn R Programming

ldstatsHD (version 1.0.1)

graphDist: Inverse of the geodesic distance matrix

Description

graphDist computes the dissimilarity matrix (inverse of geodesic distance) of a graph structure.

Usage

graphDist(A)

Arguments

A

matrix or Matrix object with adjacency matrix of a graph.

Value

a dissimilarity lower triangular matrix with the inverse of the geodesic distance matrix.

Details

The geodesic distance between two nodes \(i\) and \(j\) of a graph is given by the shortest number of edges so that we can go from one of the nodes to the other.

References

Costa, L. and F. Rodrigues (2007). Characterization of complex networks: A survey of measurements. Advances in Physics 56(1), 167-242.

See Also

graphCorr for graph correlation matrix.

Examples

Run this code
# NOT RUN {
# example to use of graphDist function
EX1         <- pcorSimulator(nobs = 50, nclusters = 2, nnodesxcluster = c(40,30), 
                             pattern = "powerLaw")
y           <- EX1$y
out3        <- huge(y, method = "mb", lambda = 0.4)
gd          <- graphDist(out3$path[[1]])
   
 
# }

Run the code above in your browser using DataLab