Graph::shortestPathFunction vector<Edge<T> > shortestPath(const T& x, const T& y); Get the shortest path between two specified vertices. Parameters
Return value
Example
Output
Time Complexity , for the weight of all edges are 1, is number of edges and is total number of vertices. , for the weight of edges are different, is number of edges and is total number of vertices. |
© The University of Hong Kong Algorithms Library - hkual@cs.hku.hk |