Have default algorithms in GruphiMain
This commit is contained in:
@ -1,11 +1,16 @@
|
|||||||
package de.oshgnacknak.gruphi;
|
package de.oshgnacknak.gruphi;
|
||||||
|
|
||||||
|
import h07.algorithm.Dijkstra;
|
||||||
|
import h07.algorithm.Kruskal;
|
||||||
|
import h07.graph.DirectedGraphFactory;
|
||||||
|
|
||||||
public class GruphiMain {
|
public class GruphiMain {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
var gruphi = new GruphiBuilder()
|
var gruphi = new GruphiBuilder()
|
||||||
// .setDirectedGraphFactory(someFactory)
|
.setDirectedGraphFactory(DirectedGraphFactory.defaultFactory())
|
||||||
// .setShortestPathsAlgorithm(somePathFinder)
|
.setShortestPathsAlgorithm(new Dijkstra<>())
|
||||||
|
.setMinimumSpanningForestAlgorithm(new Kruskal<>())
|
||||||
.createGruphi();
|
.createGruphi();
|
||||||
|
|
||||||
var frame = new GruphiFrame(gruphi);
|
var frame = new GruphiFrame(gruphi);
|
||||||
|
Reference in New Issue
Block a user