예제 #1
0
def threshold_proportional_und(cmatrix, p):
    """ Preserves a given proportion of the strongest weights in an
    undirected graph. All other weights, as well as those on the main
    diagonal, are set to zero.
    """
    m = bct.to_gslm(cmatrix.tolist())
    thr = bct.threshold_proportional_und(m, p)
    r = bct.from_gsl(thr)
    bct.gsl_free(m)
    bct.gsl_free(thr)
    return np.asarray(r)
예제 #2
0
def threshold_proportional_und(cmatrix, p):
    """ Preserves a given proportion of the strongest weights in an
    undirected graph. All other weights, as well as those on the main
    diagonal, are set to zero.
    """
    m = bct.to_gslm(cmatrix.tolist())
    thr = bct.threshold_proportional_und(m, p)
    r = bct.from_gsl(thr)
    bct.gsl_free(m)
    bct.gsl_free(thr)
    return np.asarray(r)
예제 #3
0
파일: bct.py 프로젝트: aestrivex/pyconto
def threshold_proportional_und(*args):
  return _bct.threshold_proportional_und(*args)
예제 #4
0
def threshold_proportional_und(*args):
    return _bct.threshold_proportional_und(*args)
예제 #5
0
파일: bct.py 프로젝트: aestrivex/pyconto
def threshold_proportional_und(*args):
  """threshold_proportional_und(gsl_matrix W, double p) -> gsl_matrix"""
  return _bct.threshold_proportional_und(*args)
예제 #6
0
파일: bct.py 프로젝트: omerch/pyconto
def threshold_proportional_und(*args):
    """threshold_proportional_und(gsl_matrix W, double p) -> gsl_matrix"""
    return _bct.threshold_proportional_und(*args)