From 1a55c025c0e4011bfae63bed87383b18f8105b18 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 14 Jan 2019 17:51:29 +0000 Subject: [PATCH] some numbers fixed --- parse-input-graph | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parse-input-graph b/parse-input-graph index 3a2746b..fe60ec7 100755 --- a/parse-input-graph +++ b/parse-input-graph @@ -159,8 +159,7 @@ sub edge_id_to_other_id ($$) { my $adjb = $adjsb->[$adjib]; next unless $adjb->{Name} eq $ra; # $adjb is the same edge seen from the other side - my $adjibc = ($adjib + 1) % @$adjsb; - return ($rb, $adjibc); + return ($rb, $adjib); } confess "$ra $adjia ?"; } @@ -184,7 +183,9 @@ sub dual () { foreach my $ra (sort keys %region) { my $adjsa = $region{$ra}{Adj}; foreach my $adjia (0..$#$adjsa) { - my ($rb, $adjibc) = edge_id_to_other_id($ra, $adjia); + my ($rb, $adjib) = edge_id_to_other_id($ra, $adjia); + my $adjsb = $region{$rb}{Adj}; + my $adjibc = ($adjib + 1) % @$adjsb; my $adja = $adjsa->[$adjia]; my $va = "$ra # $adjia"; # $va is the vertex at the anticlockwise end @@ -192,7 +193,6 @@ sub dual () { 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}; my $vb = "$rb # $adjibc"; # $vb is the vertex at the *clockwise* end # of that same edge, which is edge no.$adjibc of region $rb -- 2.30.2