V
 vertex type of input graphE
 edge type of input graphEE
 edge type of target graphpublic class LineGraphConverter<V,E,EE> extends Object
More formally, let $G = (V, E)$ be a graph then its line graph $L(G)$ is such that
Constructor and Description 

LineGraphConverter(Graph<V,E> graph)
Line Graph Converter

Modifier and Type  Method and Description 

void 
convertToLineGraph(Graph<E,EE> target)
Constructs a line graph $L(G)$ of the input graph $G(V,E)$.

void 
convertToLineGraph(Graph<E,EE> target,
BiFunction<E,E,Double> weightFunction)
Constructs a line graph of the input graph.

public void convertToLineGraph(Graph<E,EE> target)
target
 target graphpublic void convertToLineGraph(Graph<E,EE> target, BiFunction<E,E,Double> weightFunction)
Note: a special case arises when graph $G$ contains selfloops. Selfloops (as well as multiple edges) simply add additional nodes to line graph $L(G)$. When $G$ is directed, a selfloop $e=(v,v)$ in $G$ results in a vertex $e$ in $L(G)$, and in addition a selfloop $(e,e)$ in $L(G)$, since, by definition, the head of $e$ in $G$ is incident to its own tail. When $G$ is undirected, a selfloop $e=(v,v)$ in $G$ results in a vertex $e$ in $L(G)$, but no selfloop $(e,e)$ is added to $L(G)$, since, by convention, the line graph of an undirected graph is commonly assumed to be a simple graph.
target
 target graphweightFunction
 weight functionCopyright © 2018. All rights reserved.