Using unsigned int for numedges.