View source: R/helper_decomp_graphs.R
| is_decomposable | R Documentation |
This function returns TRUE if the graph is decomposable and FALSE otherwise
is_decomposable(adj)
adj |
Adjacency list of an undirected graph |
Logial describing whether or not adj is decomposable
# 4-cycle:
adj <- list(a = c("b", "d"), b = c("a", "c"), c = c("b", "d"), d = c("a", "c"))
is_decomposable(adj) # FALSE
# Two triangles:
adj2 <- list(a = c("b", "d"), b = c("a", "c", "d"), c = c("b", "d"), d = c("a", "c", "b"))
is_decomposable(adj2) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.