summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-02-01 20:31:28 -0500
committerdoy <doy@tozt.net>2009-02-01 20:31:28 -0500
commit861748e1915ad5f2448a0f0f740efadd8520c5d8 (patch)
treeecd53edce6b94cabac05d199020477acc6c73db3
parent8119f6d1e4bb0f5ded46a527f4cbd8aea4610c1b (diff)
downloadgraph-implicit-861748e1915ad5f2448a0f0f740efadd8520c5d8.tar.gz
graph-implicit-861748e1915ad5f2448a0f0f740efadd8520c5d8.zip
add the starting vertex to the returned traversal tree
-rw-r--r--lib/Graph/Implicit.pm1
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) };