Skip to content

Instantly share code, notes, and snippets.

Amit Moscovich mosco

Block or report user

Report or block mosco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View floyd_warshall.py
"""
floyd_warshall_fastest() is a fast Python+NumPy implementation of the Floyd-Warshall algorithm
for finding the shortest path distances between all nodes of a weighted Graph. For more details see
http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm
Tests and time comparisons to slower versions are provided.
Result of test_floyd_warshall_compatibility_on_large_matrix():
Matrix size: 100
Slow algorithm (with allocations): 0.726 seconds elapsed
You can’t perform that action at this time.