Beispiel #1
0
def number_of_nodes(cmatrix):
    """ Returns the number of nodes in a graph, assuming the given connection
    matrix is square.
    
    Parameters
    ----------
    cmatrix : connection/adjacency matrix
    """
    m = bct.to_gslm(cmatrix.tolist())
    n = bct.number_of_nodes(m)
    bct.gsl_free(m)
    return n
Beispiel #2
0
def number_of_nodes(cmatrix):
    """ Returns the number of nodes in a graph, assuming the given connection
    matrix is square.
    
    Parameters
    ----------
    cmatrix : connection/adjacency matrix
    """
    m = bct.to_gslm(cmatrix.tolist())
    n = bct.number_of_nodes(m)
    bct.gsl_free(m)
    return n
Beispiel #3
0
def number_of_nodes(*args):
  return _bct.number_of_nodes(*args)
Beispiel #4
0
def number_of_nodes(*args):
    return _bct.number_of_nodes(*args)
Beispiel #5
0
def number_of_nodes(*args):
  """number_of_nodes(gsl_matrix m) -> int"""
  return _bct.number_of_nodes(*args)
Beispiel #6
0
def number_of_nodes(*args):
    """number_of_nodes(gsl_matrix m) -> int"""
    return _bct.number_of_nodes(*args)