Package org.graph4j.connectivity
Class BridgeDetectionAlgorithm
java.lang.Object
org.graph4j.SimpleGraphAlgorithm
org.graph4j.connectivity.BridgeDetectionAlgorithm
A bridge in an undirected graph is defined as an edge which, when removed,
increases the number of connected components in the graph).
The algorithm runs in linear time, and is based on depth-first search.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.SimpleGraphAlgorithm
graph -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.graph4j.SimpleGraphAlgorithm
getGraph
-
Constructor Details
-
BridgeDetectionAlgorithm
- Parameters:
graph- the input graph.
-
-
Method Details
-
isBridgeless
public boolean isBridgeless()- Returns:
trueif the graph contains no bridge.
-
getBridges
- Returns:
- the bridges of the graph.
-