brainconn.physical_connectivity.density_und

density_und(CIJ)[source]

Density is the fraction of present connections to possible connections.

Parameters:CIJ (NxN numpy.ndarray) – undirected (weighted/binary) connection matrix
Returns:
  • kden (float) – density
  • N (int) – number of vertices
  • k (int) – number of edges

Notes

Assumes CIJ is undirected and has no self-connections.
Weight information is discarded.