From 1320a05f94a57855f1d69f2644e56213e702d224 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 16 Feb 2014 00:10:49 +0100 Subject: fix --- lib/nlp_ruby/dag.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nlp_ruby/dag.rb b/lib/nlp_ruby/dag.rb index 6f514c7..94afa23 100644 --- a/lib/nlp_ruby/dag.rb +++ b/lib/nlp_ruby/dag.rb @@ -140,7 +140,7 @@ end def DAG::bellman_ford(graph, semiring=RealSemiring.new, source_node) DAG::init(graph, semiring, source_node) edges = [] - graph.each { |n| edges |= n.edges } + graph.each { |n| edges |= n.outgoing } # relax edges (graph.size-1).times{ |i| edges.each { |e| @@ -164,7 +164,7 @@ def DAG::floyd(graph, semiring=nil) } } edges = [] - graph.each { |n| edges |= n.edges } + graph.each { |n| edges |= n.outgoing } edges.each { |e| dist_matrix[graph.index(e.tail)][graph.index(e.head)] = e.weight } -- cgit v1.2.3