From: Ian Jackson Date: Mon, 14 Jan 2019 01:47:46 +0000 (+0000) Subject: check pairing X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=7286f4e90dfe19a835c162b6397896a86f48da53;p=pandemic-rising-tide.git check pairing --- diff --git a/input-graph b/input-graph index bc0e92a..1660eb9 100644 --- a/input-graph +++ b/input-graph @@ -75,7 +75,8 @@ yellow Gelderse Vallei Betuwe Utrechtse Heuvelrug - F. + + Fl. + + Ve. high Utrechtse Heuvelrug @@ -104,6 +105,7 @@ yellow Ve. Ij. + Vo. ++ + Tw. Betuwe R.e.Ij. + Land van Maas en Waal + @@ -141,6 +143,7 @@ high Land van Heusden L..W. P.e.M. + R.e.O. green Land van Heusden @@ -175,6 +178,7 @@ red Delfland NZ + K. + M. + K.R. + V. H.W. diff --git a/parse-input-graph b/parse-input-graph index 7892ab2..f0e799f 100755 --- a/parse-input-graph +++ b/parse-input-graph @@ -123,7 +123,9 @@ sub edges () { my $ndikes = 0; foreach my $r0 (sort keys %edges) { foreach my $r1 (sort keys %{ $edges{$r0} }) { - $ndikes += $edges{$r0}{$r1}{Dikes}; + my $e = $edges{$r0}{$r1}; + confess "$r0 / $r1 : @{ $e->{L} } ?" unless @{ $e->{L} } == 2; + $ndikes += $e->{Dikes}; } } print "total $ndikes dikes\n";