예제 #1
0
 def test_computeRequiredWidth_1(self):
     options = {
         'algorithm': 'overlap',
         'layerWidth': 960,
         'density': 0.85,
         'nodeSpacing': 3,
         'stubWidth': 1
     }
     nodes = [
         Node(1, 50),
         Node(2, 50),
         Node(3, 50),
         Node(3, 50),
         Node(3, 50),
         Node(304, 50),
         Node(454, 50),
         Node(454, 50),
         Node(454, 50),
         Node(804, 50),
         Node(804, 70),
         Node(804, 50),
         Node(804, 50),
         Node(854, 50),
         Node(854, 50)
     ]
     exp_out = 812
     dist = Distributor(options)
     self.assertEqual(exp_out, dist.computeRequiredWidth(nodes))
예제 #2
0
 def test_computeRequiredWidth_1(self):
     options = {
         "algorithm": "overlap",
         "layerWidth": 960,
         "density": 0.85,
         "nodeSpacing": 3,
         "stubWidth": 1,
     }
     nodes = [
         Node(1, 50),
         Node(2, 50),
         Node(3, 50),
         Node(3, 50),
         Node(3, 50),
         Node(304, 50),
         Node(454, 50),
         Node(454, 50),
         Node(454, 50),
         Node(804, 50),
         Node(804, 70),
         Node(804, 50),
         Node(804, 50),
         Node(854, 50),
         Node(854, 50),
     ]
     exp_out = 812
     dist = Distributor(options)
     self.assertEqual(exp_out, dist.computeRequiredWidth(nodes))
예제 #3
0
 def test_computeRequiredWidth_1(self):
     options = {
             'algorithm': 'overlap',
             'layerWidth': 960,
             'density': 0.85,
             'nodeSpacing': 3,
             'stubWidth': 1
             }
     nodes = [
             Node(1, 50),
             Node(2, 50),
             Node(3, 50),
             Node(3, 50),
             Node(3, 50),
             Node(304, 50),
             Node(454, 50),
             Node(454, 50),
             Node(454, 50),
             Node(804, 50),
             Node(804, 70),
             Node(804, 50),
             Node(804, 50),
             Node(854, 50),
             Node(854, 50)]
     exp_out = 812
     dist = Distributor(options)
     self.assertEqual(exp_out, dist.computeRequiredWidth(nodes))