diff options
| author | Patrick Simianer <p@simianer.de> | 2014-02-16 00:10:49 +0100 | 
|---|---|---|
| committer | Patrick Simianer <p@simianer.de> | 2014-02-16 00:10:49 +0100 | 
| commit | 1320a05f94a57855f1d69f2644e56213e702d224 (patch) | |
| tree | 428e8a2b5b90e55e21b87361e14b9b95897805e1 | |
| parent | 7324d02ea20dbae4639a0431815090b37d1cf0c9 (diff) | |
fix
| -rw-r--r-- | lib/nlp_ruby/dag.rb | 4 | 
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    }  | 
