From 356d23508e473ae7e17fb3c56fde5207b7dca46e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 6 Feb 2014 00:56:31 +0000 Subject: [PATCH] graphviz, etc.: do not skip dropped nodes when generating defeats, so that they end up in the display graph. Delete them from the real graph later. --- compute | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compute b/compute index f7f3f67..7c70079 100755 --- a/compute +++ b/compute @@ -294,9 +294,9 @@ sub chremain () { return grep { !$ch[$_]{Dropped} } (0..$#ch); } -foreach my $ia (chremain()) { +foreach my $ia (0..$#ch) { $defeats->add_vertex($choices[$ia]); - foreach my $ib (chremain()) { + foreach my $ib (0..$#ch) { my $vab = scalar @{ $vab[$ia][$ib] }; my $vba = scalar @{ $vab[$ib][$ia] }; next unless $vab > $vba; @@ -331,6 +331,12 @@ sub weaker ($$) { our $showg = $defeats->deep_copy(); +foreach my $ix (0..$#ch) { + my $cho = $ch[$ix]; + next unless $cho->{Dropped}; + $defeats->delete_vertex($choices[$ix]); +} + our $schwartz; for (;;) { -- 2.30.2