Changed shortest path API to type agnostic.#