Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.15 KB | None | 0 0
  1. for (Vertex v : graph.values()) {
  2.     v.previous = v == source ? source : null;
  3.     v.dist = v == source ? 0 : Integer.MAX_VALUE;
  4.     q.add(v);
  5.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement