import java.util.Set;
import sk.upjs.paz.graph.Edge;
import sk.upjs.paz.graph.Graph;
import sk.upjs.paz.graph.Vertex;
public class Primov {
public Graph minKostra(Graph graph) {
Set<Edge> hrany = graph.getEdges();
Graph kostra = null;
Set<Vertex> vrcholy = graph.getVertices();
Vertex prvy = (Vertex) vrcholy.toArray()[0];
kostra.addVertex(prvy.getLabel());
for (Edge e : hrany) {
if(maVrchol(kostra, e.getSource() + maVrchol(graph, e.getTarget()) == 1)
}
}
}
public int maVrchol(Graph g, String vrchol) {
for (Vertex v : g.getVertices()) {
if(v.getLabel().equals(vrchol)) {
return 1;
}
}
return 0;
}
}