graph theory stuff for brains, or other complex networks