gAtom is an R package that exposes two graph decomposition routines backed by C + igraph.
get_minimal_collapsible(graph, r_nodes)decompose_atoms(graph)
Both functions expect graph to be an igraph object.
- R (with compilation toolchain)
- CRAN package igraph (provides bundled igraph C library)
- OpenMP support in compiler
install.packages("igraph")
install.packages(".", repos = NULL, type = "source")Or with devtools:
devtools::load_all(".")library(igraph)
library(gAtom)
g <- make_ring(6)
get_minimal_collapsible(g, c(1L, 3L))
out <- decompose_atoms(g)
str(out)