// First round values need to be in the matrix.
Iterator edgeSet = graph.getOutbound( vArray[i] ).iterator();
while ( edgeSet.hasNext() )
{
Edge e = (Edge) edgeSet.next();
int j = index( graph.getTarget( e ) );
pred[i][j] = i;
if ( graph instanceof WeightedGraph )
{
cost[i][j] = ( (WeightedGraph) graph ).getWeight( e );