def list2CG(l):
    """ convert list of edge presences/absences (0,1) to a compressed
    graph (CG) representation
    """
    n = scipy.sqrt(len(l))
    l = scipy.reshape(map(int, l), [n, n])
    G = bfu.adj2graph(l)
    return G
Beispiel #2
0
def list2CG(l):
    """ convert list of edge presences/absences (0,1) to a compressed
    graph (CG) representation
    """
    n = scipy.sqrt(len(l))
    l = scipy.reshape(map(int, l), [n, n])
    G = bfu.adj2graph(l)
    return G
def fullG(n):
    A = [[1 for j in range(n)] for i in range(n)]
    return bfu.adj2graph(np.asarray(A))
def emptyG(n):
    A = [[0 for j in range(n)] for i in range(n)]
    return bfu.adj2graph(np.asarray(A))
Beispiel #5
0
def fullG(n):
    A = [[1 for j in range(n)] for i in range(n)]
    return bfu.adj2graph(np.asarray(A))
Beispiel #6
0
def emptyG(n):
    A = [[0 for j in range(n)] for i in range(n)]
    return bfu.adj2graph(np.asarray(A))