if (($x,$y,$arch) =
m/^\{\{ chart\ label \|(\d+)\|(\d+)\| .*
\'\[\[ [^][\']* \| (\S+)\ archipelago \]\]\'*\}\}$/xi) {
- printf DEBUG "%d,%d arch %s\n", $x,$y,$arch;
+ printf DEBUG "%2d,%-2d arch %s\n", $x,$y,$arch;
push @wiarchlabels, [ $x,$y,$arch ];
} elsif (($x,$y,$island) =
m/^\{\{ chart\ island\ icon \|(\d+)\|(\d+)\|
$widists->add_vertex($n);
$wiarchs->add_vertex($n);
#print "\$g->add_vertex('$n');\n";
- printf DEBUG "%d,%d island %s\n", $x,$y,$island;
+ printf DEBUG "%2d,%-2d island %s\n", $x,$y,$island;
} elsif (($solid,$x,$y,$dirn) =
m/^\{\{ chart\ league((?:\ solid)?) \|(\d+)\|(\d+)\|
([-\/\\o]) \| .*\}\}$/xi) {
$wiarchs->add_edge($nn->(), nn_xy($bx,$by)) if $solid;
#print "\$g->add_edge('".$nn->()."','".nn_xy($bx,$by)."');\n" if $solid;
- printf DEBUG "%d,%d league %s %s \n", $x,$y,
+ printf DEBUG "%2d,%-2d league %-6s %s\n", $x,$y,
$solid?'solid':'dotted', $dirn;
} elsif (
m/^\{\{ chart\ head \}\}$/xi
map { $weight += $widists->get_edge_weight($delete, $_) } @neigh;
$widists->add_weighted_edge(@neigh, $weight);
$widists->delete_vertex($delete);
- print DEBUG "$delete elide $weight\n";
+ printf DEBUG "%-5s elide %5s %-5s %2d\n", $delete, @neigh, $weight;
}
# Check that it's connected.
my ($vx,$vy) = split /,/, $vertex;
my $d2= ($vx-$ax)*($vx-$ax) + ($vy-$ay)*($vy-$ay);
# printf DEBUG
-# "%d,%d arch-island-search %s d2=%d ccix=%d cc=%d %s\n",
+# "%2d,%-2d arch-island-search %s d2=%d ccix=%d cc=%d %s\n",
# $ax,$ay, $vertex, $d2, $ccix, scalar(@cc),
# $winode2island{$vertex};
next unless @cc > 1;
$d2best= $d2;
}
die 'no island vertices?!' unless defined $best;
- printf DEBUG "%2d,%-2d arch-island-select %5s d2=%-2d %-10s %s\n",
+ printf DEBUG "%2d,%-2d arch-island-select %-5s d2=%-2d %-10s %s\n",
$ax,$ay, $best, $d2best, $arch, $winode2island{$best};
my $ccix= $wiarchs->connected_component_by_vertex($best);
my $desc= join "\n", map {
error("would delete island: $island");
next;
}
- my $ccix= $wiarchs->connected_component_by_vertex($node);
- my $wiarch= $wiccix2arch{$ccix};
+ my $wiarch= winode2arch($node);
if (!defined $wiarch) {
error("island has no arch: $island");
next;
}
my $dbarch= $dbisland2arch{$island};
- my $wiarch= winode2arch($node);
if ($wiarch ne $dbarch) {
change("change archipelago from $dbarch to $wiarch".
" for island $island");