tests/testthat/test-articulation.points.R

test_that("articulation_points works", {
  g <- make_full_graph(5) + make_full_graph(5)
  clu <- components(g)$membership
  g <- add_edges(g, c(match(1, clu), match(2, clu)))

  ap <- as.vector(articulation_points(g))
  deg <- degree(g)
  expect_that(sort(which(deg == max(deg))), equals(sort(ap)))
})

Try the igraph package in your browser

Any scripts or data that you put into this service are public.

igraph documentation built on Aug. 10, 2023, 9:08 a.m.