is_decomposable {ess} | R Documentation |
A test for decomposability in undirected graphs
Description
This function returns TRUE
if the graph is decomposable and FALSE
otherwise
Usage
is_decomposable(adj)
Arguments
adj |
Adjacency list of an undirected graph |
Value
Logial describing whether or not adj
is decomposable
Examples
# 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
[Package ess version 1.1.2 Index]