line graph
----------
>>> import networkx as nx
>>> G=nx.star_graph(5)
>>> L=nx.line_graph(G)
>>> print nx.is_isomorphic(L,nx.complete_graph(5))
True
>>> G=nx.path_graph(5)
>>> L=nx.line_graph(G)
>>> print nx.is_isomorphic(L,nx.path_graph(4))
True
>>> G=nx.cycle_graph(5)
>>> L=nx.line_graph(G)
>>> print nx.is_isomorphic(L,G)
True
>>> G=nx.DiGraph()
>>> G.add_edges_from([(0,1),(0,2),(0,3)])
>>> L=nx.line_graph(G)
>>> print L.adj
{}
>>> G=nx.DiGraph()
>>> G.add_edges_from([(0,1),(1,2),(2,3)])
>>> L=nx.line_graph(G)
>>> print sorted(L.edges())
[((0, 1), (1, 2)), ((1, 2), (2, 3))]

