\HeaderA{graph.laplacian}{Graph Laplacian}{graph.laplacian}
\keyword{graphs}{graph.laplacian}
\begin{Description}\relax
The Laplacian of a graph.
\end{Description}
\begin{Usage}
\begin{verbatim}
graph.laplacian(graph, normalized=FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{graph}] The input graph.
\item[\code{normalized}] Whether to calculate the normalized Laplacian. See
definitions below.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The Laplacian Matrix of a graph is a symmetric matrix having
the same number of rows and columns as the number of vertices in the
graph and element (i,j) is d[i], the degree of vertex i if if i==j,
-1 if i!=j and there is an edge between vertices i and j and 0
otherwise.

A normalized version of the Laplacian Matrix is similar: element (i,j)
is 1 if i==j, -1/sqrt(d[i] d[j]) if i!=j and there is an edge between
vertices i and j and 0 otherwise.
\end{Details}
\begin{Author}\relax
Gabor Csardi \email{csardi@rmki.kfki.hu}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
g <- graph.ring(10)
graph.laplacian(g)
graph.laplacian(g, norm=TRUE)
\end{ExampleCode}
\end{Examples}

