Extend subnetworks by pairwise overlapping two sets of smaller subnetworks.

1 | ```
extend_subnets(subnet1, subnet2, size = 0)
``` |

`subnet1` |
The matrix representing the first set of subnetworks |

`subnet2` |
The matrix representing the second set of subnetworks |

`size` |
The desired size of extended subnetworks |

Enumerate all possible subnetworks of desired size by pairwise overlapping two sets of
subnetworks of size `s1`

and `s2`

. The desired size should be between
`max(s1,s2)+1`

and `s1+s2-1`

. Invalid desired size will be replaced by the
minimum allowed value `max(s1,s2)+1`

.

A matrix represents the extended subnetworks, in which each row represents a subnetwork.

1 2 3 4 5 6 | ```
library(Corbi)
net <- matrix(FALSE, nrow=10, ncol=10)
net[sample.int(100, 20)] <- TRUE
net <- net | t(net)
subnets <- get_subnets(net, 3)
subnets[[4]] <- extend_subnets(subnets[[3]], subnets[[2]], 4)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.