Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Warshall_Compute_Transitive_Clausure< GT, SA > Class Template Reference

Computes the transitive closure of a graph using Warshall's algorithm. More...

#include <warshall.H>

Inheritance diagram for Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >:
[legend]

Public Member Functions

 Warshall_Compute_Transitive_Clausure (SA __sa=SA())
 Keeps sa, the filter of the arcs, whose closure it computes.
 
void operator() (GT &g, Bit_Mat_Graph< GT, SA > &mat) const
 Invokes the computation of the transitive closure of a graph.
 

Private Attributes

SA sa
 

Detailed Description

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
class Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >

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.

See also
List_Graph Bit_Mat_Graph

Definition at line 118 of file warshall.H.

Constructor & Destructor Documentation

◆ Warshall_Compute_Transitive_Clausure()

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >::Warshall_Compute_Transitive_Clausure ( SA  __sa = SA())
inlineexplicit

Keeps sa, the filter of the arcs, whose closure it computes.

Definition at line 125 of file warshall.H.

Member Function Documentation

◆ operator()()

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
void Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >::operator() ( GT &  g,
Bit_Mat_Graph< GT, SA > &  mat 
) const
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.

Parameters
[in]gThe graph represented by a List_Graph variant.
[out]matBit matrix where the result is stored.
Exceptions
std::bad_allocif there is not enough memory.

Definition at line 138 of file warshall.H.

References Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >::sa.

Member Data Documentation

◆ sa

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
SA Aleph::Warshall_Compute_Transitive_Clausure< GT, SA >::sa
private

The documentation for this class was generated from the following file: