chiark / gitweb /
graphviz: label the edges
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 6 Feb 2014 00:55:22 +0000 (00:55 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 6 Feb 2014 00:55:22 +0000 (00:55 +0000)
compute

diff --git a/compute b/compute
index 4021eb7..f7f3f67 100755 (executable)
--- a/compute
+++ b/compute
@@ -304,6 +304,11 @@ foreach my $ia (chremain()) {
        print "defeat: $choices[$ia] beats $choices[$ib]",
            " ($vab > $vba = +$diff)\n";
        $defeats->add_edge($choices[$ia],$choices[$ib]);
+       my $label = "$diff($vab:$vba)";
+       $label .= "\n". join ' ', @{ $vab[$ia][$ib] };
+       $label .= "\n/". join ' ', @{ $vab[$ib][$ia] };
+       $defeats->set_edge_attribute($choices[$ia],$choices[$ib],
+                                    label => $label);
     }
 }