Have default algorithms in GruphiMain

This commit is contained in:
2021-09-05 22:46:07 +02:00
parent 6d4a8b26e6
commit 32c23e115c

View File

@ -1,11 +1,16 @@
package de.oshgnacknak.gruphi;
import h07.algorithm.Dijkstra;
import h07.algorithm.Kruskal;
import h07.graph.DirectedGraphFactory;
public class GruphiMain {
public static void main(String[] args) {
var gruphi = new GruphiBuilder()
// .setDirectedGraphFactory(someFactory)
// .setShortestPathsAlgorithm(somePathFinder)
.setDirectedGraphFactory(DirectedGraphFactory.defaultFactory())
.setShortestPathsAlgorithm(new Dijkstra<>())
.setMinimumSpanningForestAlgorithm(new Kruskal<>())
.createGruphi();
var frame = new GruphiFrame(gruphi);