chiark / gitweb /
remove self-edges from tdefeats which makes it prettier and makes no difference
[appendix-a6.git] / compute
diff --git a/compute b/compute
index 9e5e8ba0d78437704e5a656c10530889aaef80e6..f9855c784eb17d7cbdc023ae73e68c5154a861dd 100755 (executable)
--- a/compute
+++ b/compute
@@ -66,7 +66,7 @@ our @vab;
 
 # Go through the voters and construct V(A,B)
 
-print "\nParsing \`simple' style ballots\n"
+print "\nParsing \`simple' style ballots\n# devotee-tally-begin\n"
         if @invotes_cc;
 # actually, we pre-parse them into @invotes_v
 # since we want to show them as a tally sheet anyway
@@ -112,6 +112,9 @@ foreach my $iv (@invotes_cc) {
     push @invotes_v, [ $vstr, $voter ];
 }
 
+print "# devotee-tally-end\n"
+        if @invotes_cc;
+
 print "\nDetermining default option\n";
 
 if ($defcho && $defcho->{Index} > -1) {
@@ -277,6 +280,10 @@ for (;;) {
 
     my $tdefeats = $defeats->transitive_closure();
 
+    # this makes the debugging output prettier
+    foreach my $ch (@choices) {
+       $tdefeats->delete_edge($ch,$ch);
+    }
     print "closure graph: $tdefeats\n";
 
     print "\nSchwartz set A.6(6)\n";