tests/testthat/test-get.edgelist.R

test_that("as_edgelist works", {
  g <- sample_gnp(100, 3 / 100)
  e <- as_edgelist(g)
  g2 <- make_graph(t(e), n = vcount(g), dir = FALSE)
  expect_true(graph.isomorphic(g, g2))
})

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.