A Java implementation of a topological sorting algorithm. It includes a class called TopologicalSort that implements the ThreeTenAlg interface. Here is a brief description of the project:
- The TopologicalSort class represents a simulation of a topological sorting algorithm. It uses the edu.uci.ics.jung.graph.Graph class from the JUNG library to represent the graph on which the algorithm runs. The class has instance variables for the graph, a priority queue of nodes, a sorted list of nodes, and other properties related to the algorithm's execution. The class implements various methods defined by the ThreeTenAlg interface, including reset, isStarted, start, finish, and others. The TopologicalSort class also defines additional methods required by the algorithm, such as selectNext, updateSuccessorCost, highlightNext, simplify, and main. These methods are responsible for selecting the next node with the best priority, updating the costs of successor nodes, highlighting the next node, simplifying the graph, and executing the algorithm step by step.
- The main method demonstrates the usage of the TopologicalSort class by creating a graph, adding vertices and edges to it, and running the topological sorting algorithm on the graph.
- Here are some of the main features:
- Traverse in topological order:
2. Interactive UI:
3. Ability to edit, add,drag, and delete nodes and arcs:
4. Add sustainable edges:
5. Ability to create any number of nodes:
6. Go as complex as you want!