get_subnets {Corbi}R Documentation

All subnetworks of limited size

Description

Enumerate all subnetworks of size <= max.size from given network.

Usage

get_subnets(net.matrix, max.size = 2)

Arguments

net.matrix

The adjacent matrix of network

max.size

The maximal size of subnetworks

Value

A list of generated subnetworks, with element $i$ corresponds the subnetworks of size $i$. Each element is a matrix, in which each row represents a subnetwork.

Examples


library(Corbi)
net <- matrix(FALSE, nrow=10, ncol=10)
net[sample.int(100, 20)] <- TRUE
net <- net | t(net)
subnets <- get_subnets(net, 3)


[Package Corbi version 0.6-2 Index]