コード例 #1
0
ファイル: TestScc.py プロジェクト: samjaninf/rmtoo
 def test_scc_005(self):
     "Simple three node digraph with one scc II"
     dg = digraph_create_from_dict({
         "A": ["B", "C"],
         "B": ["A"],
         "C": ["B"]
     })
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(['A', 'C', 'B'])], "incorrect")
コード例 #2
0
 def rmttest_scc_003(self):
     "Simple three node digraph with one scc and an extra node"
     dg = Digraph({"A": ["B", "C"], "B": ["A"], "C": []})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(['C']), set(['A', 'B'])], "incorrect")
コード例 #3
0
 def rmttest_scc_002(self):
     "Simple two node digraph with no scc"
     dg = Digraph({"A": ["B"], "B": []})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(['B']), set(['A'])], "incorrect")
コード例 #4
0
ファイル: RMTTest-Scc.py プロジェクト: florath/rmtoo
 def rmttest_scc_005(self):
     "Simple three node digraph with one scc II"
     dg = Digraph({"A": ["B", "C"], "B": ["A"], "C": ["B"]})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     assert sccsnames == [set(['A', 'C', 'B'])], "incorrect"
コード例 #5
0
ファイル: RMTTest-Scc.py プロジェクト: florath/rmtoo
 def rmttest_scc_002(self):
     "Simple two node digraph with no scc"
     dg = Digraph({"A": ["B"], "B": []})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     assert sccsnames == [set(['B']), set(['A'])], "incorrect"
コード例 #6
0
ファイル: RMTTest-Scc.py プロジェクト: kown7/rmtoo
 def rmttest_scc_005(self):
     "Simple three node digraph with one scc II"
     dg = Digraph({"A": ["B", "C"], "B": ["A"], "C": ["B"]})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     assert sccsnames == [set(['A', 'C', 'B'])], "incorrect"
コード例 #7
0
ファイル: TestScc.py プロジェクト: CrypticGator/rmtoo
 def test_scc_005(self):
     "Simple three node digraph with one scc II"
     dg = digraph_create_from_dict({"A": ["B", "C"], "B": ["A"], "C": ["B"] })
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(['A', 'C', 'B'])], "incorrect")
コード例 #8
0
ファイル: TestScc.py プロジェクト: CrypticGator/rmtoo
 def test_scc_002(self):
     "Simple two node digraph with no scc"
     dg = digraph_create_from_dict({"A": ["B"], "B": [] })
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(['B']), set(['A'])], "incorrect")
コード例 #9
0
ファイル: test-scc.py プロジェクト: vakaras/rmtoo-old
 def test_scc_004(self):
     "Simple three node digraph with one scc I"
     dg = Digraph({"A": ["B", "C"], "B": ["A"], "C": ["A"]})
     sccs = strongly_connected_components(dg)
     sccsnames = node_sl_to_node_name_sl(sccs)
     self.assertEqual(sccsnames, [set(["A", "C", "B"])], "incorrect")