Scilab function

line_graph - graph with nodes corresponding to edges

Calling Sequence

g1 = line_graph(g)



line_graph returns the graph g1 with the nodes corresponding to the edges of the graph g. g1 is defined in the following way: - its nodes correspond to the edges of g - 2 nodes of the new graph are adjacent if and only if the corresponding edges of the graph g are adjacent.

The coordinates of the nodes of g1 are given by the middle points of the corresponding edges of g.


See Also