Have default algorithms in GruphiMain
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user