chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Jan 2019 15:23:33 +0000 (15:23 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 14 Jan 2019 15:23:33 +0000 (15:23 +0000)
parse-input-graph

index 37e7a54b49b61fbd36622673bdd27f2b0a89c2a0..cec240a9d5ae07bc1f32a5397e1931998afb3bc8 100755 (executable)
@@ -159,7 +159,6 @@ sub dual () {
   # anticlockwise end of the i'th listed edge of Region Name.
 
   foreach my $ra (sort keys %region) {
-    next if $ra eq 'L' or $ra eq 'NZ';
     my $adjsa = $region{$ra}{Adj};
     foreach my $adjia (0..$#$adjsa) {
       my $adja = $adjsa->[$adjia];
@@ -167,7 +166,8 @@ sub dual () {
       # $va is the vertex at the anticlockwise end
       # of edge no.$adjia of region $ra
       my $rb = $adja->{Name};
-      next if $rb eq 'L' or $rb eq 'NZ';
+      next if ($rb eq 'L' or $rb eq 'NZ') and
+             ($ra eq 'L' or $ra eq 'NZ');
       # $rb is the region on the other side of that edge
       my $adjsb = $region{$rb}{Adj};
       foreach my $adjib (0..$#$adjsb) {