Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ad007e

Browse files
committed
Graph library - removed useless condition
1 parent2b4089c commit2ad007e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎2021/graph.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,7 @@ def dijkstra(self, start, end=None):
386386
continue
387387

388388
# Adding for future examination
389-
iftype(neighbor)==complex:
390-
heapq.heappush(frontier, (current_distance+weight,neighbor))
391-
else:
392-
heapq.heappush(frontier, (current_distance+weight,neighbor))
389+
heapq.heappush(frontier, (current_distance+weight,neighbor))
393390

394391
# Adding for final search
395392
self.distance_from_start[neighbor]=current_distance+weight

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp