File: make_line_graph.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (48 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make.R
\name{make_line_graph}
\alias{make_line_graph}
\alias{line_graph}
\title{Line graph of a graph}
\usage{
make_line_graph(graph)

line_graph(...)
}
\arguments{
\item{graph}{The input graph, it can be directed or undirected.}

\item{...}{Passed to \code{make_line_graph()}.}
}
\value{
A new graph object.
}
\description{
This function calculates the line graph of another graph.
}
\details{
The line graph \code{L(G)} of a \code{G} undirected graph is defined as
follows. \code{L(G)} has one vertex for each edge in \code{G} and two
vertices in \code{L(G)} are connected by an edge if their corresponding
edges share an end point.

The line graph \code{L(G)} of a \code{G} directed graph is slightly
different, \code{L(G)} has one vertex for each edge in \code{G} and two
vertices in \code{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.
}
\examples{

# generate the first De-Bruijn graphs
g <- make_full_graph(2, directed = TRUE, loops = TRUE)
make_line_graph(g)
make_line_graph(make_line_graph(g))
make_line_graph(make_line_graph(make_line_graph(g)))

}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}, the first version of
the C code was written by Vincent Matossian.
}
\keyword{graphs}