KrozekGimVic / Grafi

Učenje algoritmov na grafih.
GNU General Public License v3.0
7 stars 0 forks source link

Incorrect tests for minimum spanning tree kruskal #19

Open brecbor opened 8 years ago

brecbor commented 8 years ago

In some tests for minimum spanning tree kruskal directed instead of undirected graph is given.

matejm commented 8 years ago

Prim's algorithm fails on this test, edges are not directed.

g = {{}, {{0, 1}}, {{0, 1}}};
EXPECT_EQ(2, sum_of_paths_minimum_spanning_tree_prim(g));

Mabye sort vertices of an edge when pushing to priority queue?

brecbor commented 8 years ago

This graph is directed and that's why the algorithm fails