Routines for network analysis.