All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graph.Main Maven / Gradle / Ivy

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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy