示例#1
0
	def setUp(self):

		G = Graph(test_vertices(),test_edges())

		self.D = Drawing(G,1000,1000)

		self.D.draw()
示例#2
0
	def setUp(self):

		self.G = Graph( test_vertices(), test_edges() )
		self.h = 1000
		self.w = 2000
		self.k = int(sqrt((self.h*self.w)/self.G.n)) # 632

		self.D = ForceDrawing( self.G, self.h, self.w )
示例#3
0
	def test_init(self):
		self.assertEqual( self.D.G, Graph( test_vertices(), test_edges() ) )
		self.assertEqual( self.D.h, self.h)
		self.assertEqual( self.D.w, self.w)

		self.assertEqual( self.D.k, self.k )