コード例 #1
0
ファイル: operations.py プロジェクト: omerch/pyconto
def threshold_absolute(cmatrix, threshold):
    """ Applies an absolute weight threshold to a graph.  All weights below
    this threshold, as well as those on the main diagonal, are set to zero.
    """
    m = bct.to_gslm(cmatrix.tolist())
    thr = bct.threshold_absolute(m, threshold)
    r = bct.from_gsl(thr)
    bct.gsl_free(m)
    bct.gsl_free(thr)
    return np.asarray(r)
コード例 #2
0
ファイル: operations.py プロジェクト: aestrivex/pyconto
def threshold_absolute(cmatrix, threshold):
    """ Applies an absolute weight threshold to a graph.  All weights below
    this threshold, as well as those on the main diagonal, are set to zero.
    """
    m = bct.to_gslm(cmatrix.tolist())
    thr = bct.threshold_absolute(m, threshold)
    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_absolute(*args):
  return _bct.threshold_absolute(*args)
コード例 #4
0
def threshold_absolute(*args):
    return _bct.threshold_absolute(*args)
コード例 #5
0
ファイル: bct.py プロジェクト: aestrivex/pyconto
def threshold_absolute(*args):
  """threshold_absolute(gsl_matrix W, double thr) -> gsl_matrix"""
  return _bct.threshold_absolute(*args)
コード例 #6
0
ファイル: bct.py プロジェクト: omerch/pyconto
def threshold_absolute(*args):
    """threshold_absolute(gsl_matrix W, double thr) -> gsl_matrix"""
    return _bct.threshold_absolute(*args)