get_articulation_points: Get articulation points

Description

Get the nodes in the graph that are identified as articulation points.

Usage

1

Arguments

graph

a graph object of class dgr_graph.

Value

a vector of node IDs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Create a random graph
graph <-
  create_random_graph(
    30, 50, set_seed = 1) %>%
  set_node_attrs("shape", "square")

# Get the articulation points in the graph (i.e.,
# those nodes that if any were to be removed, the
# graph would become disconnected)
get_articulation_points(graph)
#> [1]  8 22 24

# For the articulation points, change the node
# shape to a circle
graph <-
  graph %>%
  select_nodes_by_id(
    get_articulation_points(.)) %>%
  set_node_attrs_ws("shape", "circle")

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.