summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/nlp_ruby/dag.rb4
1 files 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
}