add basic functions for single source shortest path.