1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/make.R
3\name{make_line_graph}
4\alias{make_line_graph}
5\alias{line.graph}
6\alias{line_graph}
7\title{Line graph of a graph}
8\usage{
9make_line_graph(graph)
10
11line_graph(...)
12}
13\arguments{
14\item{graph}{The input graph, it can be directed or undirected.}
15
16\item{...}{Passed to \code{make_line_graph}.}
17}
18\value{
19A new graph object.
20}
21\description{
22This function calculates the line graph of another graph.
23}
24\details{
25The line graph \code{L(G)} of a \code{G} undirected graph is defined as
26follows. \code{L(G)} has one vertex for each edge in \code{G} and two
27vertices in \code{L(G)} are connected by an edge if their corresponding
28edges share an end point.
29
30The line graph \code{L(G)} of a \code{G} directed graph is slightly
31different, \code{L(G)} has one vertex for each edge in \code{G} and two
32vertices in \code{L(G)} are connected by a directed edge if the target of
33the first vertex's corresponding edge is the same as the source of the
34second vertex's corresponding edge.
35}
36\examples{
37
38# generate the first De-Bruijn graphs
39g <- make_full_graph(2, directed=TRUE, loops=TRUE)
40make_line_graph(g)
41make_line_graph(make_line_graph(g))
42make_line_graph(make_line_graph(make_line_graph(g)))
43
44}
45\author{
46Gabor Csardi \email{csardi.gabor@gmail.com}, the first version of
47the C code was written by Vincent Matossian.
48}
49\keyword{graphs}
50