DW_Graph_Algo - meytar14/ex2 GitHub Wiki
DW_Graph_Algo
Constructor:
DW_Graph_Algo()- constructor
Methods:
copy()- return a deep copy of this graph.
getGraph()- return this graph.
init(directed_weighted_graph g)- initializing this "g" to this graph.
isConnected()- return true if this graph is connected, else return false.
load(java.lang.String file) - load this graph into this "g".
save(java.lang.String file)- Saves this weighted (directed) graph to the given file name - in JSON format.
shortestPath(int src, int dest)- returns the the shortest path between src to dest - as an ordered List of nodes.
shortestPathDist(int src, int dest)- returns the length of the shortest path between src to dest Note: if no such path --> returns -1