diff options
author | doy <doy@tozt.net> | 2009-02-01 20:31:28 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-02-01 20:31:28 -0500 |
commit | 861748e1915ad5f2448a0f0f740efadd8520c5d8 (patch) | |
tree | ecd53edce6b94cabac05d199020477acc6c73db3 | |
parent | 8119f6d1e4bb0f5ded46a527f4cbd8aea4610c1b (diff) | |
download | graph-implicit-861748e1915ad5f2448a0f0f740efadd8520c5d8.tar.gz graph-implicit-861748e1915ad5f2448a0f0f740efadd8520c5d8.zip |
add the starting vertex to the returned traversal tree
-rw-r--r-- | lib/Graph/Implicit.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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) }; |