brainconn.distance.findwalks

findwalks(CIJ)[source]

Walks are sequences of linked nodes, that may visit a single node more than once. This function finds the number of walks of a given length, between any two nodes.

Parameters:CIJ (NxN numpy.ndarray) – binary directed/undirected connection matrix
Returns:
  • Wq (NxNxQ numpy.ndarray) – Wq[i,j,q] is the number of walks from i to j of length q
  • twalk (int) – total number of walks found
  • wlq (Qx1 numpy.ndarray) – walk length distribution as a function of q

Notes

Wq grows very quickly for larger N,K,q. Weights are discarded.