Does anyone know an efficient algorithm to compute the edge-adjacency matrix (also known as the line graph L(G)) of a graph (G) starting from its traditional vertex-adjacency matrix?
By definition
The edge-adjacency matrix E of G is a square and symmetric matrix whose elements eij are 1 if and only if edge i is adjacent to edge j. Two edges are adjacent if they are incidents to a common vertex.
Target transformation example. The nodes and edges’ roles are inversed in the new graph.
