Tulip
6.0.0
Large graphs analysis and drawing
|
#include <ConnectedTest.h>
Static Public Member Functions | |
static void | computeConnectedComponents (const Graph *graph, std::vector< std::vector< node >> &components) |
static bool | isConnected (const Graph *const graph) |
static void | makeConnected (Graph *graph, std::vector< edge > &addedEdges) |
static unsigned int | numberOfConnectedComponents (const Graph *const graph) |
Performs a test of connexity on the graph, and provides a function to make a graph connected. From Wikipedia: "A graph is said to be connected if every pair of vertices in the graph are connected." (i.e. there is a path between every pair of vertices).
Definition at line 40 of file ConnectedTest.h.
|
static |
Computes the sets of connected components and stores the result in the components vector.
graph | The graph on which to compute connected components. |
components | The components that were found. It is passed as a reference to avoid copying the data when returning. |
|
static |
Checks if a graph is connected (i.e. there is a path between every pair of vertices).
graph | The graph to check. |
|
static |
If the graph is not connected, adds edges to make it connected.
graph | The graph to make connected. |
addedEdges | The edges that were added to make it connected. |
|
static |
Gets the number of connected components in the graph.
graph | The graph in which to count the number of connected components. |