Heavily edited abstract class ShortestPathAlgorithms