83 template <AlephGraph GT, ArcFilter<GT> SA = Dft_Show_Arc<GT> >
92 for (
int k = 0;
k < n;
k++)
94 for (
int i = 0; i < n; i++)
95 for (
int j = 0; j < n; j++)
96 mat(i, j) = mat_prev(i, j) or
97 (mat_prev(i,
k)
and mat_prev(
k, j));
117 template <AlephGraph GT, ArcFilter<GT> SA = Dft_Show_Arc<GT> >
126 :
sa(
std::move(__sa)) {}
140 warshall_compute_transitive_clausure <GT, SA> (g, mat,
sa);
C++20 concepts for the protocol shared by graph algorithms.
Bit matrix for graph connectivity.
size_t get_num_nodes() const noexcept
Get number of nodes (matrix dimension)
GT * get_list_graph() noexcept
Get pointer to associated graph (nullptr if none)
void set_list_graph(GT &g, SA sa=SA())
Associate with a graph.
Computes the transitive closure of a graph using Warshall's algorithm.
void operator()(GT &g, Bit_Mat_Graph< GT, SA > &mat) const
Invokes the computation of the transitive closure of a graph.
Warshall_Compute_Transitive_Clausure(SA __sa=SA())
Keeps sa, the filter of the arcs, whose closure it computes.
void warshall_compute_transitive_clausure(GT &g, Bit_Mat_Graph< GT, SA > &mat, SA sa=SA())
Computes the transitive closure of a graph using Warshall's algorithm.
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
Generic graph and digraph implementations.
Adjacency matrix representations for graphs.