Description
This project is Java GUI application, which allow you work with graphs. Create vertices and connect them by edges, visualize graph algorithms like traversals, spanning trees, and shortest path-findings.
Requirements
- Create Vertex Mode: user can create the vertex with special name by clicking on main panel
- Create Edge Mode: user can connect vertices by clicking on two vertices. He can create the weighted edges. If try to connect vertices which already had edge, program update the weight of this edge.
- Remove Edge Mode: user can remove edge between vertices by clicking on edge.
- Remove vertices: user can remove vertices by clicking on them. Also program automatically remove all its edges.
- New mode: user can clear panel.
- None mode: user cannot do something on main panel.
Graph Algorithms
- Depth-first search (DFS) is an algorithm for traversing or searching tree/graph data structures. The algorithm starts at the root node and explores it as far as possible along each branch before backtracking. In the case of a graph, it can select any node.
- Breadth-first search (BFS) algorithm traverses a graph by the breadth and uses a queue to get to the next vertex and to start a search when a dead end occurs in any iteration.
- Dijkstra's algorithm allow to find the shortest path between selected vertex and other vertices.
- Prim's algorithm for a minimum spanning tree (MTS). MTS is a subset of the edges of a connected edge-weighted undirected graph. It connects all graph vertices with the minimum possible total edge weight without cycles.
Launch
Clone this repository and run command mvn package -PRun
in terminal.