summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Graph/Implicit.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Graph/Implicit.pm b/lib/Graph/Implicit.pm
index effe18d..6fed28e 100644
--- a/lib/Graph/Implicit.pm
+++ b/lib/Graph/Implicit.pm
@@ -41,7 +41,7 @@ sub edges {
sub neighbors {
my $self = shift;
my ($from) = @_;
- return $self->($from);
+ return map { $$_[0] } $self->($from);
}
sub is_bipartite {
@@ -143,7 +143,7 @@ sub astar {
($max_vert, $max_score) = ($vertex, $score)
if ($score > $max_score);
}
- $neighbors{$vertex} = [$self->neighbors($vertex)]
+ $neighbors{$vertex} = [$self->($vertex)]
unless exists $neighbors{$vertex};
for my $neighbor (@{ $neighbors{$vertex} }) {
my ($vert_n, $weight_n) = @{ $neighbor };