예제 #1
0
파일: measures.py 프로젝트: omerch/pyconto
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)
예제 #2
0
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)
예제 #3
0
파일: bct.py 프로젝트: aestrivex/pyconto
def jdegree(*args):
  return _bct.jdegree(*args)
예제 #4
0
def jdegree(*args):
    return _bct.jdegree(*args)
예제 #5
0
파일: bct.py 프로젝트: aestrivex/pyconto
def jdegree(*args):
  """jdegree(gsl_matrix CIJ) -> gsl_matrix"""
  return _bct.jdegree(*args)
예제 #6
0
파일: bct.py 프로젝트: omerch/pyconto
def jdegree(*args):
    """jdegree(gsl_matrix CIJ) -> gsl_matrix"""
    return _bct.jdegree(*args)