\HeaderA{get.adjlist}{Adjacency lists}{get.adjlist}
\aliasA{get.adjedgelist}{get.adjlist}{get.adjedgelist}
\keyword{graphs}{get.adjlist}
\begin{Description}\relax
Create adjacency lists from a graph, either for adjacent
edges or for neighboring vertices
\end{Description}
\begin{Usage}
\begin{verbatim}
get.adjlist(graph, mode = c("all", "out", "in", "total"))
get.adjedgelist(graph, mode = c("all", "out", "in", "total"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{graph}] The input graph.
\item[\code{mode}] Character scalar, it gives what kind of adjacent
edges/vertices to include in the lists. \sQuote{\code{out}} is for
outgoing edges/vertices, \sQuote{\code{in}} is for incoming
edges/vertices, \sQuote{\code{all}} is for both. This argument is
ignored for undirected graphs.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{get.adjlist} returns a list of numeric vectors, which include
the ids of neighbor vertices (according to the \code{mode} argument) of all
vertices.

\code{get.adjedgelist} returns a list of numeric vectors, which
include the ids of adjacent edgs (according to the \code{mode}
argument) of all vertices.
\end{Details}
\begin{Value}
A list of numeric vectors.
\end{Value}
\begin{Author}\relax
Gabor Csardi \email{csardi@rmki.kfki.hu}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{get.edgelist}{get.edgelist}}, \code{\LinkA{get.adjacency}{get.adjacency}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
g <- graph.ring(10)
get.adjlist(g)
get.adjedgelist(g)
\end{ExampleCode}
\end{Examples}

