Exemplo n.º 1
0
 def setUp(self):
     self.G = {(1,1): {(2,2): 0.125, (3,3): 0.75}, (2,2): {(1,1): 0.125, (4,4): 1.2},
                (3,3): {(1,1): 0.75, (4,4): 0.375},
                (4,4): {(2,2): 1.2, (3,3): 0.375, (5,5): 0.5},
                (5,5): {(4,4): 0.5}, (6,6):{(7,7):1.0}, (7,7):{(6,6):1.0}}
     self.G_meshed = pynet.mesh_network(self.G, 0.1)
     self.points = [((3.6666666666666665, 3.6666666666666665), (3.5, 3.5), 
                      1.8011569244041523e-18, 8.0119209423694433e-18), 
                    ((4.0, 4.0), (3.8333333333333335, 3.8333333333333335), 
                      6.4354219496947843e-18, 1.3190733783852405e-17), 
                    ((6.5999999999999996, 6.5999999999999996), (6.5, 6.5), 
                      8.6525456558003033e-19, 4.0412843678067672e-18)]
     self.proj_points = []
     for p in self.points:
         self.proj_points.append(pynet.proj_pnt_coor(p))
Exemplo n.º 2
0
 def setUp(self):
     self.G = {
         (1, 1): {
             (2, 2): 0.125,
             (3, 3): 0.75
         },
         (2, 2): {
             (1, 1): 0.125,
             (4, 4): 1.2
         },
         (3, 3): {
             (1, 1): 0.75,
             (4, 4): 0.375
         },
         (4, 4): {
             (2, 2): 1.2,
             (3, 3): 0.375,
             (5, 5): 0.5
         },
         (5, 5): {
             (4, 4): 0.5
         },
         (6, 6): {
             (7, 7): 1.0
         },
         (7, 7): {
             (6, 6): 1.0
         }
     }
     self.G_meshed = pynet.mesh_network(self.G, 0.1)
     self.points = [((3.6666666666666665, 3.6666666666666665), (3.5, 3.5),
                     1.8011569244041523e-18, 8.0119209423694433e-18),
                    ((4.0, 4.0), (3.8333333333333335, 3.8333333333333335),
                     6.4354219496947843e-18, 1.3190733783852405e-17),
                    ((6.5999999999999996, 6.5999999999999996), (6.5, 6.5),
                     8.6525456558003033e-19, 4.0412843678067672e-18)]
     self.proj_points = []
     for p in self.points:
         self.proj_points.append(pynet.proj_pnt_coor(p))
Exemplo n.º 3
0
 def test_proj_pnt_coor(self):
     point = pynet.proj_pnt_coor(self.points[0])
     point_value = (3.6360755692750462, 3.6360755692750462)
     self.assertEqual(point, point_value)
Exemplo n.º 4
0
 def test_proj_pnt_coor(self):
     point = pynet.proj_pnt_coor(self.points[0])
     point_value = (3.6360755692750462, 3.6360755692750462)
     self.assertEqual(point, point_value)