tests/testthat/test-bug-1032819.R

test_that("VF2 isomorphism considers colors", {
  g <- make_full_graph(3)
  path <- make_ring(3, circular = F)
  V(g)$color <- c(1, 1, 2)
  V(path)$color <- c(1, 2, 1)
  n <- count_subgraph_isomorphisms(path, g, method = "vf2")
  expect_that(n, equals(2))
})

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.