Changeset 28298 in osm for applications/editors/josm/plugins/utilsplugin2/src/edu
- Timestamp:
- 2012-04-14T17:31:42+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/edu/princeton/cs/algs4/DijkstraSP.java
r28116 r28298 48 48 pq = new IndexMinPQ<Double>(G.V()); 49 49 pq.insert(s, distTo[s]); 50 int count = 0; 50 51 while (!pq.isEmpty()) { 51 52 int v = pq.delMin(); 52 53 for (DirectedEdge e : G.adj(v)) 53 54 relax(e); 55 count++; 56 if (count > G.V()) 57 throw new RuntimeException("Exceeded limit"); 54 58 } 55 59
Note:
See TracChangeset
for help on using the changeset viewer.