public FloydWarshallShortestPaths(Graph<V, E> graph) {
   this.graph = graph;
   this.vertices = new ArrayList<V>(graph.vertexSet());
 }