Graph_Algo - rotemish7/OOP_Ex3-4 GitHub Wiki
This class implements graph_algorithms.
In this class we created a number of functions you can apply on the graph,such as shortest path,isConnected,TSP and more.
shortestpath - return a list of of nodes that you need to pass throw from src to dest. this functions is based on the weight of the edges and not on the nodes themselves. meaning there could be a way with less nodes but its not the shortest by weight.
shortestPathDist - return the weight of the path from src to dest. this functions is based on shortestPath.
TSP - this function get a list of keys called tragets and returns a list of nodes that represnet a relatively short path that include all the keys. this is not really a TSP becasue its not returns the shortest path but a relativley short one. if the graph is not strongly connected the function will return null.
isConnected - this functions return a false or true whethere the grpah is strongly connected or not.
copy - creates a new deep copy of the graph.
init - initialize a graph from a file.
save - saves the grpah as an object to a new file.