Class StrongConnectivity
- Namespace
- Graphity
- Assembly
- Graphity.Core.dll
The strong bridges and strong articulation points of a graph, as StrongConnectivityOf(BiAdjacentGraph) returns them.
public sealed class StrongConnectivity
- Inheritance
-
StrongConnectivity
- Inherited Members
Examples
Here, in the control flow of the method load, the loop splits into several SCCs without
header, body or next, but not without then:
StrongConnectivity strong =
Components.StrongConnectivityOf(BiAdjacentGraph.Of(cfg));
Edges strongBridges = strong.StrongBridges;
// strongBridges: header -> body, body -> then, then -> next, next -> header
SortedIntView strongArticulationPoints = strong.StrongArticulationPoints;
// strongArticulationPoints: [1, 2, 4] - header, body and next
Remarks
A strong bridge is an edge whose removal increases the number of SCCs (strongly connected components), and a strong articulation point is a node whose removal does the same. Strong bridges lie inside SCCs of two or more nodes. Strong articulation points lie inside SCCs of three or more nodes, since without one node of an SCC of two, the other still forms an SCC. So a graph without cycles has neither, and a self-loop is never a strong bridge.
The edges are followed in their direction, as by SccsOf(Graph): the edges
a -> b and b -> a are two edges, and both are strong bridges of the SCC they form.
Biconnectivity has the counterparts for a graph read as undirected.
Instances are immutable and safe to share between threads.
Memory: up to 28 x NodeCount bytes.
Properties
StrongArticulationPoints
Gets the strong articulation points, in ascending order.
public SortedIntView StrongArticulationPoints { get; }
Property Value
Remarks
Time: O(1).
StrongBridges
Gets the strong bridges, in edge index order.
public Edges StrongBridges { get; }
Property Value
Remarks
Time: O(1).