cliques {ggm} | R Documentation |
Finds the cliques of an undirected graph.
cliques(gmat)
gmat |
a square Boolean matrix with dimnames, representing the edge matrix of an undirected graph. |
The cliques of a graph are the subsets of nodes which induce a maximally complete subgraph. The algorithm is NP-complete in general.
a list of vectors of integers representing subsets of the set of nodes.
The code was written by somebody at Lancaster University.
Lauritzen, S. (1996). Graphical models. Oxford: Clarendon Press.
## Two cliques u <- UG(~ a*b*c + c*d*e*g) u cliques(u) ## the same (note that the formula is not of a graphical model) u <- UG(~ a*b+b*c+c*a + c*d*e*g) u cliques(u)