Learn R Programming

cograph (version 2.0.0)

network_cut_vertices: Cut Vertices (Articulation Points)

Description

Finds nodes whose removal would disconnect the network. These are critical nodes for network connectivity.

Usage

network_cut_vertices(x, count_only = FALSE, ...)

Value

If count_only = FALSE, vector of node indices (or names if graph is named). If count_only = TRUE, integer count.

Arguments

x

Network input: matrix, igraph, network, cograph_network, or tna object

count_only

Logical. If TRUE, return only the count. Default FALSE.

...

Additional arguments passed to to_igraph

Examples

Run this code
# Bridge node connecting two components
adj <- matrix(c(0,1,1,0,0, 1,0,1,0,0, 1,1,0,1,0, 0,0,1,0,1, 0,0,0,1,0), 5, 5)
network_cut_vertices(adj)  # Node 3 is cut vertex
network_cut_vertices(adj, count_only = TRUE)  # 1

Run the code above in your browser using DataLab