title: Floyd Warshall algorithm to constrained shortest path algorithm
body: <p>I have an implementation of a Floyd-Warshall algorithm and my objective is to find the shortest path from a vertex to another, passing in a list of vertices. The way I'm thinking to do this is to somehow keep all the paths generated by the Floyd-Warshall and then iterate for all its paths and find the shortest path for each intermediate vertex. The problem with this approach is that I will have a factorial complexity. Is this the best way to approach or I'm missing something?</p>