Graph_GUI - michaeleliyahu/OOP GitHub Wiki
The class's purpose is to create the graph. we used in Jframe class.
Window, initGUI, paint, actionPerformed
Sample graph:
Vertices:
1, 2, 3, 4, 5
edges: (source , destination , weight)
(1,2,5) , (2,3,10) , (3,4,9) , (4,5,3) , (1,3,3) , (3,5,10) , (2,3,1)
The result will be:
Save option- save the file
Load option- load a file
test1
test2
shortestPathDist function - Find Shortest path
shortestPath function - draw the Shortest path
result:
IsConnected function - checking if the graph Is connected
TSP function
result: