コード例 #1
0
ファイル: tests.py プロジェクト: adrianN/edge-connectivity
def yes(nodes, graphs):
	for i in xrange(graphs//3):
		print i
		G = rg.make_simple(rg.random_3_edge_connected(nodes))
		yield G
	for i in xrange(graphs//3):
		print i+graphs//3
		G = rg.make_simple(rg.dense_3_edge_connected(nodes))
		yield G
	for i in xrange(graphs//3):
		print i+2*graphs//3
		G = rg.make_simple(rg.sparse_3_edge_connected(nodes))
		yield G
	print
コード例 #2
0
def yes(nodes, graphs):
    for i in xrange(graphs // 3):
        print i
        G = rg.make_simple(rg.random_3_edge_connected(nodes))
        yield G
    for i in xrange(graphs // 3):
        print i + graphs // 3
        G = rg.make_simple(rg.dense_3_edge_connected(nodes))
        yield G
    for i in xrange(graphs // 3):
        print i + 2 * graphs // 3
        G = rg.make_simple(rg.sparse_3_edge_connected(nodes))
        yield G
    print
コード例 #3
0
ファイル: tests.py プロジェクト: adrianN/edge-connectivity
def no(nodes, graphs):
	for i in xrange(graphs//3):
		print i
		G = rg.not_3_conn(nodes)
		G = rg.make_simple(G)
		yield G
	for i in xrange(graphs//3):
		print i+graphs//3
		G = rg.not_3_conn(nodes, 'dense')
		G = rg.make_simple(G)
		yield G
	for i in xrange(graphs//3):
		print i+2*graphs//3
		G = rg.not_3_conn(nodes, 'sparse')
		G = rg.make_simple(G)
		yield G
	print
コード例 #4
0
def no(nodes, graphs):
    for i in xrange(graphs // 3):
        print i
        G = rg.not_3_conn(nodes)
        G = rg.make_simple(G)
        yield G
    for i in xrange(graphs // 3):
        print i + graphs // 3
        G = rg.not_3_conn(nodes, 'dense')
        G = rg.make_simple(G)
        yield G
    for i in xrange(graphs // 3):
        print i + 2 * graphs // 3
        G = rg.not_3_conn(nodes, 'sparse')
        G = rg.make_simple(G)
        yield G
    print