X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=yarrg%2Fyppedia-chart-parser;fp=yarrg%2Fyppedia-chart-parser;h=54a0e4577604592c6e365a1de0be7159c8446e08;hp=228d1e2c4fae0f47cd058df5f1cbad73d5378a8c;hb=d19f38cd441c797c810999c05770ce981d2e53a4;hpb=1478fddc005bdaa1fa3ab731a0bd59613502e90d diff --git a/yarrg/yppedia-chart-parser b/yarrg/yppedia-chart-parser index 228d1e2..54a0e45 100755 --- a/yarrg/yppedia-chart-parser +++ b/yarrg/yppedia-chart-parser @@ -423,7 +423,8 @@ sub shortest_path_reduction ($$) { 1. F is an undirected weighted graph with positive edge weights. - 2. All graphs we will consider have the same vertices as F. + 2. All graphs we will consider have the same vertices as F + and none have self-edges. 3. G = Closure(F) is the graph of cliques whose edge weights are the shortest paths in F, one clique for each connected @@ -480,6 +481,7 @@ END my $result= Graph::Undirected->new(); foreach my $edge_ac ($g->edges()) { + next if $edge_ac->[0] eq $edge_ac->[1]; my $edgename_ac= join ' .. ', @$edge_ac; printf DEBUG "spr %s edge %s\n", $what, $edgename_ac; my $w_ac= $g->get_edge_weight(@$edge_ac);