brainconn.reference.latmio_und_connected

latmio_und_connected(R, itr, D=None)[source]

This function “latticizes” an undirected network, while preserving the degree distribution. The function does not preserve the strength distribution in weighted networks. The function also ensures that the randomized network maintains connectedness, the ability for every node to reach every other node in the network. The input network for this function must be connected.

Parameters:
  • R (NxN numpy.ndarray) – undirected binary/weighted connection matrix
  • itr (int) – rewiring parameter. Each edge is rewired approximately itr times.
  • D (numpy.ndarray | None) – distance-to-diagonal matrix. Defaults to the actual distance matrix if not specified.
Returns:

  • Rlatt (NxN numpy.ndarray) – latticized network in original node ordering
  • Rrp (NxN numpy.ndarray) – latticized network in node ordering used for latticization
  • ind_rp (Nx1 numpy.ndarray) – node ordering used for latticization
  • eff (int) – number of actual rewirings carried out