Function cnetworks::stitch_together [−][src]
pub fn stitch_together(net: &mut Network)
Stich the network together if it is not whole.
A random element of net
is chosen as the root and the ‘main’ network is it’s reachable
teritory. From the unreachable teritory a random node is chosen and connected to a random
elemnt of the ‘main’ network, thus marking it and its reachable teritory as no longer
unreachable. The process is repeated until there are no unreachable nodes left.