# line.graph

From igraph v0.5.3
by Gabor Csardi

##### Line graph of a graph

This function calculates the line graph of another graph.

- Keywords
- graphs

##### Usage

`line.graph(graph)`

##### Arguments

- graph
- The input graph, it can be directed or undirected.

##### Details

The line graph `L(G)`

of a `G`

undirected graph is defined as
follows. `L(G)`

has one vertex for each edge in `G`

and two
vertices in `L(G)`

are connected by an edge if their
corresponding edges share an end point.

The line graph `L(G)`

of a `G`

directed graph is slightly
different, `L(G)`

has one vertex for each edge in `G`

and two
vertices in `L(G)`

are connected by a directed edge if the target
of the first vertex's corresponding edge is the same as the source of
the second vertex's corresponding edge.

##### Value

- A new graph object.

##### concept

Line graph

##### Examples

```
# generate the first De-Bruijn graphs
g <- graph.full(2, directed=TRUE, loops=TRUE)
line.graph(g)
line.graph(line.graph(g))
line.graph(line.graph(line.graph(g)))
```

*Documentation reproduced from package igraph, version 0.5.3, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.