networkx/networkx — pull request #856 by hagberg (2013-03-17 03:57:29+00:00)
Title: Don't copy subgraphs in cuthill_mckee_ordering().

The connected_component_subgraphs() function used in the cuthill_mckee_ordering() makes a copy. That causes new node objects to be created which might not be desirable when returning a node ordering if the hash changes when a new object is created.

The fix is to not copy nodes when forming a subgraph of connected nodes.

This fixes a bug identified in the stackoverflow question
http://stackoverflow.com/questions/15451289/python-networkx-cannot-use-current-flow-betweenness-centrality-function/

Example that shows the problem:
```python
import networkx as nx

g=nx.Graph()
a=object()
b=object()
c=object()
d=object()
g.add_edge(a,b,{'distance': 4.0})
g.add_edge(a,c,{'distance': 1.5})
g.add_edge(b,c,{'distance': 2.2})
g.add_edge(c,d,{'distance': 2.6})
result = nx.current_flow_betweenness_centrality(g, weight='distance')
```