Beispiel #1
0
def main():
	'''

	main()
	
	Out: Three images have been saved,
		1) A bipartite Halin graph, bdg_halin0.png
		2) Its corresponding mobile, bdg_mobile.png
		3) The planar map corresponding to the mobile, bdg_halin1.png.
			Note: not necessarily the same graph as 1), since
			the BDG bijection depends on the embedding of the graph.

	'''

	
	# Make a mobile
	T = graphUtil.sampleTree()
	
	M = treeToMobile.treeToMobile( T, labels = 2 )

	# Map the mobile to a graph.
	G = mobileToGraph( M, eps = graphUtil.coin() )

	graphUtil.saveGraph( M, 'bdg_M' )
	graphUtil.saveGraph( G, 'bdg_G' )
Beispiel #2
0
def main():
	'''

	main()
	
	Out: An image, treeToMobile.png, of a mobile 
		has been saved

	'''

	T = graphUtil.sampleTree()

	M = treeToMobile( T, 2 )
	
	graphUtil.saveGraph( T, 'tree' )

	graphUtil.saveGraph( M, 'treeToMobile' )
Beispiel #3
0
def main():
    '''

	main()
	
	Out: Three images have been saved,
		1) A bipartite Halin graph, bdg_halin0.png
		2) Its corresponding mobile, bdg_mobile.png
		3) The planar map corresponding to the mobile, bdg_halin1.png.
			Note: not necessarily the same graph as 1), since
			the BDG bijection depends on the embedding of the graph.

	'''

    # Make a mobile
    T = graphUtil.sampleTree()

    M = treeToMobile.treeToMobile(T, labels=2)

    # Map the mobile to a graph.
    G = mobileToGraph(M, eps=graphUtil.coin())

    graphUtil.saveGraph(M, 'bdg_M')
    graphUtil.saveGraph(G, 'bdg_G')