Example #1
0
 def test_graph(self):
     G = nx.path_graph(8)
     S = {3, 4, 5}
     expansion = nx.node_expansion(G, S)
     # The neighborhood of S has cardinality five, and S has
     # cardinality three.
     expected = 5 / 3
     assert_equal(expected, expansion)
Example #2
0
 def test_graph(self):
     G = nx.path_graph(8)
     S = {3, 4, 5}
     expansion = nx.node_expansion(G, S)
     # The neighborhood of S has cardinality five, and S has
     # cardinality three.
     expected = 5 / 3
     assert expected == expansion
Example #3
0
 def test_graph(self):
     G = nx.path_graph(8)
     S = set([3, 4, 5])
     expansion = nx.node_expansion(G, S)
     # The neighborhood of S has cardinality five, and S has
     # cardinality three.
     expected = 5 / 3
     assert_equal(expected, expansion)