Ask Your Question

Revision history [back]

If G is your Sage graph, you can turn it into a networkx graph with the networkx_graph as in the following example:

sage: from networkx import algebraic_connectivity as AlgebraicConnectivity

sage: G = graphs.PetersenGraph()
sage: H = G.networkx_graph()
sage: AlgebraicConnectivity(H)
1.9999999999999993

sage: G = graphs.CompleteGraph(12)
sage: H = G.networkx_graph()
sage: AlgebraicConnectivity(H)
11.999999999999998