def jdegree(cmatrix, edgetype='directed'): """ Joint degree distribution. This function returns a matrix, in which the value of each element (u,v) corresponds to the number of nodes that have u outgoing connections and v incoming connections. Connection weights are ignored. Parameters ---------- cmatrix : connection/adjacency matrix Returns ------- J : joint degree distribution matrix (shifted by one) Note: This function only makes sense for directed matrices. Weights are discarded. Olaf Sporns, Indiana University, 2002/2006/2008 """ m = bct.to_gslm(cmatrix.tolist()) jdeg = bct.jdegree(m) jdegnp = bct.from_gsl(jdeg) bct.gsl_free(m) bct.gsl_free(jdeg) return np.asarray(jdegnp)
def jdegree(cmatrix, edgetype = 'directed'): """ Joint degree distribution. This function returns a matrix, in which the value of each element (u,v) corresponds to the number of nodes that have u outgoing connections and v incoming connections. Connection weights are ignored. Parameters ---------- cmatrix : connection/adjacency matrix Returns ------- J : joint degree distribution matrix (shifted by one) Note: This function only makes sense for directed matrices. Weights are discarded. Olaf Sporns, Indiana University, 2002/2006/2008 """ m = bct.to_gslm(cmatrix.tolist()) jdeg = bct.jdegree(m) jdegnp = bct.from_gsl(jdeg) bct.gsl_free(m) bct.gsl_free(jdeg) return np.asarray(jdegnp)
def jdegree(*args): return _bct.jdegree(*args)
def jdegree(*args): """jdegree(gsl_matrix CIJ) -> gsl_matrix""" return _bct.jdegree(*args)