Some utilities for working with edgelists