graph.Main Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of astra-compiler Show documentation
Show all versions of astra-compiler Show documentation
Core compiler artifact for the ASTRA Language
The newest version!
package graph;
import graph.algorithm.BreadthFirstSearchAlgorithm;
import graph.algorithm.DepthFirstSearchAlgorithm;
import graph.algorithm.DijkstraShortestPathAlgorithm;
import graph.algorithm.DijkstraShortestPathTreeAlgorithm;
import graph.algorithm.KruskalMSTAlgorithm;
import graph.algorithm.PrimJarnikMSTAlgorithm;
import graph.gui.JGraphFrame;
import graph.impl.AdjacencyMatrixGraph;
public class Main {
public static void main(String[] args) {
JGraphFrame frame = new JGraphFrame(new AdjacencyMatrixGraph(), "weights.gra");
frame.registerGraphAlgorithm("Complete Breadth First Search Overlay", new BreadthFirstSearchAlgorithm());
frame.registerGraphAlgorithm("Complete Depth First Search Overlay", new DepthFirstSearchAlgorithm());
frame.registerGraphAlgorithm("Dijkstra Shortest Path Tree Overlay", new DijkstraShortestPathTreeAlgorithm());
frame.registerGraphAlgorithm("Dijkstra Shortest Path Overlay", new DijkstraShortestPathAlgorithm());
frame.registerGraphAlgorithm("Kruskal MST Overlay", new KruskalMSTAlgorithm());
frame.registerGraphAlgorithm("Prim Jarnik MST Overlay", new PrimJarnikMSTAlgorithm());
frame.setVisible(true);
}
}