\HeaderA{compGdist}{A function to compute the distance between pairs of nodes in a graph.}{compGdist}
\keyword{manip}{compGdist}
\begin{Description}\relax
Given a graph, \code{g}, and a set of nodes in the graph,
\code{whNodes}, Dijkstra's shortest path algorithm is used to compute
the distance between all pairs of nodes in \code{whNodes}.
\end{Description}
\begin{Usage}
\begin{verbatim}
compGdist(g, whNodes, verbose = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{g}] An instance of the \code{graph} class. 
\item[\code{whNodes}] A vector of lables of the nodes in \code{g} for which
distances are to be computed. 
\item[\code{verbose}] If \code{TRUE} then output reporting the progress will
be reported. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function can be quite slow, computation of the pairwise
distances is not especially fast and if \code{whNodes} is long then
there are many of them to compute.
\end{Details}
\begin{Value}
A matrix containing the pairwise distances. It might be worth making
this an instance of the \code{dist} class at some point.
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{compCorrGraph}{compCorrGraph}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

 example(compCorrGraph)
 compGdist(corrG, nodes(corrG)[1:5])

\end{ExampleCode}
\end{Examples}

