def _rcm_estimate(G, nodelist):
    'Estimate the Fiedler vector using the reverse Cuthill-McKee ordering.\n    '
    G = G.subgraph(nodelist)
    order = reverse_cuthill_mckee_ordering(G)
    n = len(nodelist)
    index = dict(zip(nodelist, range(n)))
    x = ndarray(n, dtype=float)
    for (i, u) in enumerate(order):
        x[index[u]] = i
    x -= ((n - 1) / 2.0)
    return x
Estimate the Fiedler vector using the reverse Cuthill-McKee ordering.
def _rcm_estimate(G, nodelist):
    '\n    '
    G = G.subgraph(nodelist)
    order = reverse_cuthill_mckee_ordering(G)
    n = len(nodelist)
    index = dict(zip(nodelist, range(n)))
    x = ndarray(n, dtype=float)
    for (i, u) in enumerate(order):
        x[index[u]] = i
    x -= ((n - 1) / 2.0)
    return x