def caveman_graph(l, k):
    # l disjoint cliques of size k
    G = nx.empty_graph(l*k)
    G.name = "caveman_graph(%s,%s)" % (l*k, k)
    if k > 1:
        for start in range(0, l*k, k):
            edges = itertools.combinations(range(start, start+k), 2)
            G.add_edges_from(edges)
    return G
Return the PortType object that is referenced by this port.
dataset/ETHPy150Open networkx/networkx/networkx/generators/community.py/caveman_graph--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/SOAPpy/wstools/WSDLTools.py/Port.getPortType