|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Path reconstruction from Floyd-Warshall path matrices. More...
Go to the source code of this file.
Classes | |
| class | Aleph::Find_Min_Path< Mat, Compare > |
| Functor wrapper for find_min_path. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::mat_path_detail |
Concepts | |
| concept | Aleph::mat_path_detail::Arc_With_Distance |
Whether the arcs of GT give their weights by get_info().get_distance(), and Compare compares them. | |
Functions | |
| template<class GT , class Compare > | |
| void | Aleph::mat_path_detail::append_node (GT &g, Path< GT > &path, typename GT::Node *node) |
| template<class Mat , class Compare = std::less<>> | |
| void | Aleph::find_min_path (Mat &p, long src_idx, long tgt_idx, Path< typename Mat::Graph_Type > &path) |
| Build a minimum path from Floyd-Warshall path matrix using indices. | |
| template<class Mat , class Compare = std::less<>> | |
| void | Aleph::find_min_path (Mat &p, typename Mat::Node *src_node, typename Mat::Node *tgt_node, Path< typename Mat::Graph_Type > &path) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Build a minimum path using node pointers instead of indices. | |
Path reconstruction from Floyd-Warshall path matrices.
This file provides utilities for reconstructing minimum paths from the path matrix computed by the Floyd-Warshall all-pairs shortest path algorithm.
After running Floyd-Warshall (see latex_floyd.H or Floyd_Warshall.H), you obtain two matrices:
This file provides find_min_path() to reconstruct the actual path from the path matrix.
For a path from node i to node j:
path(i, j) contains the index of the next node after i on the shortest pathDefinition in file mat_path.H.