Implement `add-vertices'` for directed weighted graphs