/** * Clears the predecessor list, resets the distance to the default value and * resets the shortest path count and dependency to zero. */ @Override public void reset() { // Clear the predecessor list and reset the distance to the default // distance. super.reset(); // Reset the shortest path count and dependency to zero. vCent.reset(); }
@Override protected void init(V startNode) { super.init(startNode); for (V node : graph.vertexSet()) { node.reset(); } startNode.setSource(); queue.clear(); queue.add(startNode); }