From 32c23e115c37df83be356be8df26d195f880d744 Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Sun, 5 Sep 2021 22:46:07 +0200 Subject: [PATCH] Have default algorithms in GruphiMain --- src/main/java/de/oshgnacknak/gruphi/GruphiMain.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/oshgnacknak/gruphi/GruphiMain.java b/src/main/java/de/oshgnacknak/gruphi/GruphiMain.java index fb1f8d6..acc97aa 100644 --- a/src/main/java/de/oshgnacknak/gruphi/GruphiMain.java +++ b/src/main/java/de/oshgnacknak/gruphi/GruphiMain.java @@ -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);