Split `add-vertices'` implementation for weighted/unweighted graphs