Graphity for TypeScript 3.0.0
    Preparing search index...

    The bridges, articulation points and biconnected components of a graph read as undirected, as Components.biconnectivityOf returns them.

    A bridge is an edge whose removal increases the number of connected components, and an articulation point is a node whose removal does the same. A biconnected component, also called a block, is a maximal group of edges in which any two edges lie on a common cycle. The blocks partition the edges, not the nodes: an articulation point belongs to every block it touches.

    The graph is read as undirected, as described at Components: the edges a -> b and b -> a are one undirected edge. So a graph that stores its edges in both directions still has bridges, and the two directions of an edge lie in the same block. Self-loops are in no block and never a bridge. Here, the control flow of the method load, whose loop is connected to the rest only through header:

    const biconnectivity = Components.biconnectivityOf(BiAdjacentGraph.of(cfg));
    const bridges = biconnectivity.bridges;
    // bridges: entry -> header, header -> exit
    const articulationPoints = biconnectivity.articulationPoints;
    // articulationPoints: [1] - header

    Instances are immutable.

    Memory: up to 8 x edgeCount + 20 x nodeCount bytes.

    Index
    • get blocks(): EdgePartition

      The blocks, as a partition of the edges (Java: blocks()).

      Each block is a group of the partition: blocks.get(e) returns the block of edge e, and blocks.edgesOf(block) the edges of a block. Self-loops are in no block and map to -1, so IndexMapping.isPartial is true exactly if the graph has self-loops. Which block gets which group ID is not specified, but the same graph always yields the same group IDs.

      Time: O(1).

      Returns EdgePartition