コード例 #1
0
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert len(G) == 3
     G = duplication_divergence_graph(3, 1, seed=42)
     assert len(G) == 3
コード例 #2
0
 def test_probability_too_large(self):
     with pytest.raises(NetworkXError):
         duplication_divergence_graph(3, 2)
コード例 #3
0
ファイル: test_duplication.py プロジェクト: networkx/networkx
 def test_probability_too_large(self):
     duplication_divergence_graph(3, 2)
コード例 #4
0
ファイル: test_duplication.py プロジェクト: networkx/networkx
 def test_probability_too_small(self):
     duplication_divergence_graph(3, -1)
コード例 #5
0
ファイル: test_duplication.py プロジェクト: networkx/networkx
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert_equal(len(G), 3)
     G = duplication_divergence_graph(3, 1, seed=42)
     assert_equal(len(G), 3)
コード例 #6
0
ファイル: divergent.py プロジェクト: coliva92/py-siset-exp
 def _generate_graph(self, n):
     return duplication_divergence_graph(n, self._params['p'])
コード例 #7
0
ファイル: test_duplication.py プロジェクト: Harshi3030/algos
 def test_probability_too_small(self):
     duplication_divergence_graph(3, -1)
コード例 #8
0
ファイル: test_duplication.py プロジェクト: Harshi3030/algos
 def test_probability_too_large(self):
     duplication_divergence_graph(3, 2)
コード例 #9
0
ファイル: test_duplication.py プロジェクト: Harshi3030/algos
 def test_final_size(self):
     G = duplication_divergence_graph(3, 1)
     assert_equal(len(G), 3)
     G = duplication_divergence_graph(3, 1, seed=42)
     assert_equal(len(G), 3)