Exemplo n.º 1
0
 def test_determine_connectivity_multiple_branch(self):
     reset_node_id()
     tree = [
         MBFPoint(3, 3, 4, 2),
         MBFPoint(3, 3, 4, 2),
         MBFPoint(3, 3, 4, 2),
         [
             MBFPoint(2, 1, 5, 7),
             MBFPoint(2, 1, 5, 7),
             MBFPoint(2, 1, 5, 7),
             [
                 MBFPoint(2, 4, 8, 5.7),
                 MBFPoint(2, 4, 8, 5.7),
                 MBFPoint(2, 4, 8, 5.7),
                 MBFPoint(2, 4, 8, 5.7)
             ],
             [
                 MBFPoint(2, 4, 8, 5.7),
                 MBFPoint(2, 4, 8, 5.7),
                 MBFPoint(2, 4, 8, 5.7)
             ]
         ], [MBFPoint(2, 4, 8, 5.7),
             MBFPoint(2, 4, 8, 5.7)]
     ]
     self.assertListEqual(
         [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9],
          [9, 10], [6, 11], [11, 12], [12, 13], [3, 14], [14, 15]],
         determine_tree_connectivity(tree))
Exemplo n.º 2
0
 def test_determine_connectivity_branch(self):
     reset_node_id()
     tree = [
         MBFPoint(3, 3, 4, 2), [MBFPoint(2, 1, 5, 7)],
         [MBFPoint(2, 4, 8, 5.7)]
     ]
     self.assertListEqual([[1, 2], [1, 3]],
                          determine_tree_connectivity(tree))
Exemplo n.º 3
0
 def test_determine_connectivity_basic(self):
     reset_node_id()
     tree = [
         MBFPoint(3, 3, 4, 2),
         MBFPoint(2, 1, 5, 7),
         MBFPoint(3, 1, 4.2, 7.1)
     ]
     self.assertListEqual([[1, 2], [2, 3]],
                          determine_tree_connectivity(tree))