From 861748e1915ad5f2448a0f0f740efadd8520c5d8 Mon Sep 17 00:00:00 2001 From: doy Date: Sun, 1 Feb 2009 20:31:28 -0500 Subject: add the starting vertex to the returned traversal tree --- lib/Graph/Implicit.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Graph/Implicit.pm b/lib/Graph/Implicit.pm index 8c8c608..d54bf9a 100644 --- a/lib/Graph/Implicit.pm +++ b/lib/Graph/Implicit.pm @@ -52,6 +52,7 @@ sub _traversal { my $bag = $create->(); my %marked; my %pred; + $pred{$start} = undef; $insert->($bag, [undef, $start], 0); while ($notempty->($bag)) { my ($pred, $vertex) = @{ $remove->($bag) }; -- cgit v1.2.3-54-g00ecf