Example #1
0
def threshold_proportional_dir(cmatrix, p):
    """ Preserves a given proportion of the strongest weights in a directed
    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_dir(m, p)
    r = bct.from_gsl(thr)
    bct.gsl_free(m)
    bct.gsl_free(thr)
    return np.asarray(r)
Example #2
0
def threshold_proportional_dir(cmatrix, p):
    """ Preserves a given proportion of the strongest weights in a directed
    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_dir(m, p)
    r = bct.from_gsl(thr)
    bct.gsl_free(m)
    bct.gsl_free(thr)
    return np.asarray(r)
Example #3
0
def threshold_proportional_dir(*args):
  return _bct.threshold_proportional_dir(*args)
Example #4
0
def threshold_proportional_dir(*args):
    return _bct.threshold_proportional_dir(*args)
Example #5
0
def threshold_proportional_dir(*args):
  """threshold_proportional_dir(gsl_matrix W, double p) -> gsl_matrix"""
  return _bct.threshold_proportional_dir(*args)
Example #6
0
def threshold_proportional_dir(*args):
    """threshold_proportional_dir(gsl_matrix W, double p) -> gsl_matrix"""
    return _bct.threshold_proportional_dir(*args)