|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Computes the transitive closure of a graph using Warshall's algorithm. More...
#include <warshall.H>
Public Member Functions | |
| void | operator() (GT &g, Bit_Mat_Graph< GT > &mat) const |
| Invokes the computation of the transitive closure of a graph. | |
Computes the transitive closure of a graph using Warshall's algorithm.
This functor class computes the transitive closure of a graph using Warshall's algorithm. The result is stored in a bit matrix.
Each entry (i,j) in the matrix indicates whether there exists a path from the source node with index i to the destination node with index j.
Definition at line 113 of file warshall.H.
|
inline |
Invokes the computation of the transitive closure of a graph.
The procedure uses two bit matrices: an internal temporary one (freed when the procedure ends) and the output matrix mat.
| [in] | g | The graph represented by a List_Graph variant. |
| [out] | mat | Bit matrix where the result is stored. |
| std::bad_alloc | if there is not enough memory. |
Definition at line 127 of file warshall.H.
References Aleph::maps().