Added support for undirected graphs to Bellman Ford