This is a script to solve the general shortest path problem based on Floyd–Warshall algorithm. Input the Adjacency Matrix, and you'll get the shortest path and the shortest path distance.
I'll supplement other algorithms of solving this problem, like Dijkstra's algorithm and Bellman–Ford algorithm, sometime. Anyone who are interested can contribute to this work.