FindAllCG: Find all the connected subgraphs whose size <= lc

Description Usage Arguments Value See Also Examples

Description

FindAllCG uses FindCG iteratively, and lists all the connected subgraphs with no more than lc nodes

Usage

1
FindAllCG(adjacency.matrix, lc)

Arguments

adjacency.matrix

p by p adjacency matrix of an undirected graph; it must be symmetric.

lc

the maximal size of the connected subgraphs to be listed

Value

cg.all

A list, whose kth component is a matrix with k columns that lists all the connected subgraphs with k nodes.

See Also

FindCG

Examples

1
2
3
4
5
require(MASS)
require(Matrix)
p <- 10
Omega <- sparseMatrix(c(1:(p-1),2:p),c(2:p,1:(p-1)),x=1)
cg.all <- FindAllCG(Omega,3)

ScreenClean documentation built on May 2, 2019, 9:27 a.m.